Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(self, project_name):
demo_project = Project.query.get(project_name)
db.session.delete(demo_project)
db.session.commit()
def delete(self, project):
db.session.delete(project)
db.session.commit()
return "DELETED"
def delete_bill(bill_id):
# fixme: everyone is able to delete a bill
bill = Bill.query.get(g.project, bill_id)
if not bill:
return redirect(url_for(".list_bills"))
db.session.delete(bill)
db.session.commit()
flash(_("The bill has been deleted"))
return redirect(url_for(".list_bills"))