Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgrammingError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions #1952

Closed
sentry-io bot opened this issue Mar 7, 2024 · 0 comments · Fixed by #1953
Closed
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Mar 7, 2024

Sentry Issue: CARE-8BN

InvalidColumnReference: SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT COUNT(*) FROM (SELECT DISTINCT ON ("facility_patientr...
                                                  ^
  File "django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)
  File "psycopg/cursor.py", line 737, in execute
    raise ex.with_traceback(None)

ProgrammingError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions
LINE 1: SELECT COUNT(*) FROM (SELECT DISTINCT ON ("facility_patientr...
                                                  ^
(19 additional frame(s) were not displayed)
...
  File "care/facility/api/viewsets/patient.py", line 472, in list
    return super(PatientViewSet, self).list(request, *args, **kwargs)
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 a pull request may close this issue.

1 participant