Fix import form flow logic

pull/15/head
Leigh Morresi 4 years ago
parent fb38b06eae
commit 5b2fda1a6e

@ -318,14 +318,15 @@ def changedetection_app(config=None, datastore_o=None):
messages.append({'class': 'ok', 'message': "{} Imported, {} Skipped.".format(good, len(remaining_urls))}) messages.append({'class': 'ok', 'message': "{} Imported, {} Skipped.".format(good, len(remaining_urls))})
if len(remaining_urls) == 0: if len(remaining_urls) == 0:
# Looking good, redirect to index.
return redirect(url_for('index')) return redirect(url_for('index'))
# @todo repair
else: # Could be some remaining, or we could be on GET
output = render_template("import.html", output = render_template("import.html",
messages=messages, messages=messages,
remaining="\n".join(remaining_urls) remaining="\n".join(remaining_urls)
) )
messages = [] messages = []
return output return output

Loading…
Cancel
Save