removed debugging, ran black

This commit is contained in:
rosechar 2020-04-14 17:01:03 -04:00
parent 790d312073
commit 067aef2c46
2 changed files with 17 additions and 14 deletions

View file

@ -394,9 +394,9 @@ class Bill(db.Model):
def to_json(self): def to_json(self):
bill_dict = self._to_serialize bill_dict = self._to_serialize
owers_list = [] owers_list = []
for ower in bill_dict['owers']: for ower in bill_dict["owers"]:
owers_list.append(ower.id) owers_list.append(ower.id)
bill_dict['owers'] = owers_list bill_dict["owers"] = owers_list
return bill_dict return bill_dict
def pay_each(self): def pay_each(self):

View file

@ -705,7 +705,6 @@ def undo_delete_bill():
db.session.add(form.fake_form(bill, g.project)) db.session.add(form.fake_form(bill, g.project))
db.session.commit() db.session.commit()
print(bill.to_json())
return redirect(url_for(".list_bills")) return redirect(url_for(".list_bills"))
@ -721,7 +720,11 @@ def delete_bill(bill_id):
db.session.commit() db.session.commit()
url = url_for(".undo_delete_bill") url = url_for(".undo_delete_bill")
alert = 'The bill has been deleted <a class="alert-link" href="' + url + '" id="undo"> undo </a>' alert = (
'The bill has been deleted <a class="alert-link" href="'
+ url
+ '" id="undo"> undo </a>'
)
flash(Markup(alert)) flash(Markup(alert))
return redirect(url_for(".list_bills")) return redirect(url_for(".list_bills"))