Skip to content

Commit

Permalink
Force convert string to int
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 committed Sep 20, 2024
1 parent b2c7fc9 commit 3ca76e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions auth-api/src/auth_api/models/affiliation_invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,27 @@ def filter_by(cls, search_filter: AffiliationInvitationSearch, query=None) -> li
results = db.session.query(AffiliationInvitation)

if search_filter.from_org_id:
results = results.filter(AffiliationInvitation.from_org_id == search_filter.from_org_id)
results = results.filter(AffiliationInvitation.from_org_id == int(search_filter.from_org_id))
filter_set = True

if search_filter.to_org_id:
results = results.filter(AffiliationInvitation.to_org_id == search_filter.to_org_id)
results = results.filter(AffiliationInvitation.to_org_id == int(search_filter.to_org_id))
filter_set = True

if search_filter.sender_id:
results = results.filter(AffiliationInvitation.sender_id == search_filter.sender_id)
results = results.filter(AffiliationInvitation.sender_id == int(search_filter.sender_id))
filter_set = True

if search_filter.approver_id:
results = results.filter(AffiliationInvitation.approver_id == search_filter.approver_id)
results = results.filter(AffiliationInvitation.approver_id == int(search_filter.approver_id))
filter_set = True

if search_filter.entity_id:
results = results.filter(AffiliationInvitation.entity_id == search_filter.entity_id)
results = results.filter(AffiliationInvitation.entity_id == int(search_filter.entity_id))
filter_set = True

if search_filter.affiliation_id:
results = results.filter(AffiliationInvitation.affiliation_id == search_filter.affiliation_id)
results = results.filter(AffiliationInvitation.affiliation_id == int(search_filter.affiliation_id))
filter_set = True

if search_filter.status_codes:
Expand Down

0 comments on commit 3ca76e6

Please sign in to comment.