Skip to content

Conversation

@nonprofittechy
Copy link
Member

Previously, it was possible to get duplicate results from find_matching_sessions and get_saved_interview_list. It seems this mostly would be the case when an advocate joined a session created by a user from the general public.

This is a modest fix that just adds SELECT DISTINCT to those queries.

Fix #888

…rning a duplicate entry for the one an advocate joined
@nonprofittechy nonprofittechy merged commit 12cd9bb into main Dec 1, 2025
8 checks passed
@nonprofittechy nonprofittechy deleted the 888-unique-session-results branch December 1, 2025 21:11
@BryceStevenWilley
Copy link
Contributor

FWIW, this is erroring on dev:

ProgrammingError: (psycopg2.errors.InvalidColumnReference) SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 2:         SELECT DISTINCT ON (userdict.key) userdict.indexno
                                    ^                     

Copy link
Member Author

I'm looking at it now :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't show the same session twice - use a unique constraint on the session ID when searching sessions

3 participants