1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 21:14:18 +00:00

🐛 Fix internal server error on repository list

This commit is contained in:
Stefano Pigozzi 2021-05-07 16:59:21 +02:00
parent 6af4d57f36
commit f19571504c
Signed by untrusted user who does not match committer: steffo
GPG key ID: 6965406171929D01

View file

@ -63,10 +63,10 @@ def page_repositories():
owner = Repository.query.filter_by(owner_id=user.email) owner = Repository.query.filter_by(owner_id=user.email)
spectator = Authorization.query.filter_by(email=user.email).join(Repository) spectator = Authorization.query.filter_by(email=user.email).join(Repository)
if request.args.get("onlyActive"): if request.args.get("onlyActive"):
owner = owner.filter_by(isActive=True) owner = owner.filter_by(is_active=True)
spectator = spectator.filter(Repository.is_active) spectator = spectator.filter(Repository.is_active)
elif request.args.get("onlyDead"): elif request.args.get("onlyDead"):
owner = owner.filter_by(isActive=False) owner = owner.filter_by(is_active=False)
spectator = spectator.filter(not Repository.is_active) spectator = spectator.filter(not Repository.is_active)
owner = owner.all() owner = owner.all()
spectator = spectator.all() spectator = spectator.all()