Skip to content

Commit e39aa98

Browse files
committed
Fix bad use of not and is in SQLAlchemy filter
1 parent 5d84ac7 commit e39aa98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cms/server/admin/handlers/user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def get(self, user_id):
5454
.all()
5555
self.r_params["unassigned_contests"] = \
5656
self.sql_session.query(Contest)\
57-
.filter(not Contest.id.in_(
57+
.filter(Contest.id.notin_(
5858
self.sql_session.query(Participation.contest_id)
59-
.filter(Participation.user is user)
59+
.filter(Participation.user == user)
6060
.all()))\
6161
.all()
6262
self.render("user.html", **self.r_params)

0 commit comments

Comments
 (0)