Revised and simplified the code for the URL on txn_delete() in the accounting application.
This commit is contained in:
parent
34fb682de1
commit
dd8b192913
@ -948,10 +948,7 @@ def txn_delete(request, txn):
|
|||||||
txn.delete()
|
txn.delete()
|
||||||
for x in txn_to_sort:
|
for x in txn_to_sort:
|
||||||
x.save()
|
x.save()
|
||||||
if "r" in request.GET:
|
url = request.GET.get("r") or reverse("accounting:home")
|
||||||
url = request.GET.get("r")
|
|
||||||
else:
|
|
||||||
url = reverse("accounting:home")
|
|
||||||
message = gettext_noop("This transaction was deleted successfully.")
|
message = gettext_noop("This transaction was deleted successfully.")
|
||||||
return success_redirect(request, url, message)
|
return success_redirect(request, url, message)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user