mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-15 17:01:49 +02:00
issue 2 fixed
This commit is contained in:
parent
77e33286aa
commit
3b74e2cea1
1 changed files with 16 additions and 10 deletions
|
@ -773,6 +773,9 @@ def edit_bill(bill_id):
|
|||
bill = Bill.query.get(g.project, bill_id)
|
||||
if not bill:
|
||||
raise NotFound()
|
||||
payer_id = bill.payer_id
|
||||
payer = Person.query.get(payer_id)
|
||||
if payer.activated:
|
||||
|
||||
form = get_billform_for(g.project, set_default=False)
|
||||
|
||||
|
@ -787,6 +790,9 @@ def edit_bill(bill_id):
|
|||
form.fill(bill, g.project)
|
||||
|
||||
return render_template("add_bill.html", form=form, edit=True)
|
||||
else:
|
||||
flash(_("The payer is deactivated. You cannot edit the bill."))
|
||||
return redirect(url_for(".list_bills"))
|
||||
|
||||
|
||||
@main.route("/lang/<lang>")
|
||||
|
|
Loading…
Reference in a new issue