After editing transaction, redirect back to previous page
This commit is contained in:
parent
a8ec41b2f2
commit
a3ef647a2d
@ -85,7 +85,7 @@ def journal_edit_transaction():
|
||||
db.session.delete(reconciliation)
|
||||
|
||||
db.session.commit()
|
||||
return redirect(url_for('journal'))
|
||||
return redirect(request.form.get('referrer', '') or url_for('journal'))
|
||||
|
||||
# Edit transaction
|
||||
transaction.dt = datetime.strptime(request.form['dt'], '%Y-%m-%d')
|
||||
@ -121,7 +121,7 @@ def journal_edit_transaction():
|
||||
|
||||
db.session.commit()
|
||||
|
||||
return redirect(url_for('journal'))
|
||||
return redirect(request.form.get('referrer', '') or url_for('journal'))
|
||||
|
||||
@app.route('/balance-assertions')
|
||||
def balance_assertions():
|
||||
|
@ -125,6 +125,8 @@
|
||||
{% endif %}
|
||||
<button type="submit" class="btn btn-primary ms-auto">Save</button>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="referrer" value="{{ request.referrer or '' }}">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user