Skip to content

Commit

Permalink
Fix get_assertions_by_email so it actually functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtgay committed Jun 19, 2013
1 parent 5a1e07a commit 42fe140
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tahrir_api/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ def get_assertions_by_email(self, person_email):

session = scoped_session(self.session_maker)
if self.person_exists(person_email):
return session.query(Assertion).filter_by(email=person_email).all()
person_id = session.query(Person).filter_by(
email=person_email).one().id
return session.query(Assertion).filter_by(
person_id=person_id).all()
else:
return False

Expand Down

0 comments on commit 42fe140

Please sign in to comment.