Skip to content

Commit

Permalink
few more type casts (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
bolyachevets authored Oct 23, 2024
1 parent 54de24d commit 4082b4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth-api/src/auth_api/models/affidavit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def find_by_org_id(cls, org_id: int, filtered_affidavit_statuses=None):
db.session.query(Affidavit)
.join(Membership, Membership.user_id == Affidavit.user_id)
.join(Org, Org.id == Membership.org_id)
.filter(Org.id == org_id)
.filter(Org.id == int(org_id or -1))
.filter(Affidavit.status_code.notin_(filtered_affidavit_statuses))
.one_or_none()
) # There should be only one record at most, else throw error
Expand Down
2 changes: 1 addition & 1 deletion auth-api/src/auth_api/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def find_users_by_org_id_by_status_by_roles(cls, org_id: int, roles, status=Stat
& (MembershipModel.membership_type_code.in_(roles)),
)
.join(OrgModel)
.filter(OrgModel.id == org_id)
.filter(OrgModel.id == int(org_id or -1))
.all()
)

Expand Down

0 comments on commit 4082b4e

Please sign in to comment.