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

IntegrityError: null value in column "consultation_id" of relation "facility_patientconsultationevent" violates n... #2495

Closed
sentry-io bot opened this issue Sep 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working Carried over

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 24, 2024

Sentry Issue: CARE-FBC

NotNullViolation: null value in column "consultation_id" of relation "facility_patientconsultationevent" violates not-null constraint
DETAIL:  Failing row contains (135829, 01J8J6W0TWCB7WGW8DYF33M6KY, 2024-09-24 14:27:22.572763+00, PatientNotes, 1211, t, {"external_id": "fe88b0cb-906d-449a-aa5b-ab8e3b427f73"}, {"note": "feawwafe", "user_type": "RemoteSpecialist"}, CREATED, 2788, null, 48, 2024-09-24 14:27:22.572763+00).
  File "django/db/backends/utils.py", line 105, in _execute
    return self.cursor.execute(sql, params)
  File "psycopg/cursor.py", line 97, in execute
    raise ex.with_traceback(None)

IntegrityError: null value in column "consultation_id" of relation "facility_patientconsultationevent" violates not-null constraint
DETAIL:  Failing row contains (135829, 01J8J6W0TWCB7WGW8DYF33M6KY, 2024-09-24 14:27:22.572763+00, PatientNotes, 1211, t, {"external_id": "fe88b0cb-906d-449a-aa5b-ab8e3b427f73"}, {"note": "feawwafe", "user_type": "RemoteSpecialist"}, CREATED, 2788, null, 48, 2024-09-24 14:27:22.572763+00).
(19 additional frame(s) were not displayed)
...
  File "care/facility/api/viewsets/patient.py", line 1057, in perform_create
    create_consultation_events(
  File "care/facility/events/handler.py", line 109, in create_consultation_events
    create_consultation_event_entry(
  File "care/facility/events/handler.py", line 74, in create_consultation_event_entry
    PatientConsultationEvent.objects.bulk_create(batch)
@rithviknishad
Copy link
Member

To reproduce, post a message in discussion notes from the patient registration page. PatientConsultationEvent is attempted to be created, however, discussion notes from from Patient registration is not associated to a consultation.

@github-project-automation github-project-automation bot moved this to Triage in Care Sep 24, 2024
@bodhish bodhish added bug Something isn't working Carried over labels Sep 30, 2024
@yash-learner
Copy link
Member

I would like to give it a try, Can this be assigned to me ?

@bodhish bodhish moved this from Triage to In Progress in Care Nov 10, 2024
@bodhish bodhish closed this as completed Nov 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Care Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Carried over
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants