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