Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def reactivate(member_id):
person = (
Person.query.filter(Person.id == member_id)
.filter(Project.id == g.project.id)
.all()
)
if person:
person[0].activated = True
db.session.commit()
flash(_("%(name)s is part of this project again", name=person[0].name))
return redirect(url_for(".list_bills"))
def get_by_name(self, name, project):
return (
Person.query.filter(Person.name == name)
.filter(Project.id == project.id)
.one()