Skip to content

Commit

Permalink
Fixes the error with the user listing query. (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-massie authored Apr 23, 2024
1 parent bcd8792 commit 4c2f213
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apcd-cms/src/apps/utils/apcd_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_users():
port=APCD_DB['port'],
sslmode='require'
)
query = """SELECT
query = """SELECT
users.role_id,
users.user_id,
users.user_email,
Expand All @@ -33,11 +33,11 @@ def get_users():
users.active,
users.user_number,
roles.role_name
FROM users
NATURAL JOIN roles
LEFT JOIN submitter_users ON users.user_id = submitter_users.user_id
AND users.user_number = submitter_users.user_number
LEFT JOIN submitters on submitter_users.submitter_id = submitters.submitter_id
FROM users
LEFT JOIN roles on roles.role_id = users.role_id
LEFT JOIN submitter_users ON users.user_id = submitter_users.user_id
AND users.user_number = submitter_users.user_number
LEFT JOIN submitters on submitter_users.submitter_id = submitters.submitter_id
ORDER BY submitters.entity_name ASC;
"""
cur = conn.cursor()
Expand Down

0 comments on commit 4c2f213

Please sign in to comment.