Skip to content

Commit

Permalink
task/update-sub-admin-query-table (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-massie authored Nov 9, 2023
1 parent 7b64d6a commit c5a13e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apcd-cms/src/apps/utils/apcd_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def get_registrations(reg_id=None, submitter_code=None):
registrations.registration_year
FROM registrations
{f"WHERE registration_id = {str(reg_id)}" if reg_id is not None else ''}
{f"LEFT JOIN submitters on registrations.registration_id = submitters.registration_id WHERE submitter_code = '{str(submitter_code)}' ORDER BY registrations.registration_id" if submitter_code is not None else ''}"""
{f"LEFT JOIN registration_submitters on registrations.registration_id = registration_submitters.registration_id LEFT JOIN submitters ON registration_submitters.submitter_id = submitters.submitter_id WHERE submitter_code = '{str(submitter_code)}' ORDER BY registrations.registration_id" if submitter_code is not None else ''}"""
cur = conn.cursor()
cur.execute(query)
return cur.fetchall()
Expand Down

0 comments on commit c5a13e0

Please sign in to comment.