You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: PatientConsultation() got unexpected keyword arguments: 'bed'
File "rest_framework/serializers.py", line 989, in create
instance = ModelClass._default_manager.create(**validated_data)
File "django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "django/db/models/query.py", line 656, in create
obj = self.model(**kwargs)
File "django/db/models/base.py", line 567, in __init__
raise TypeError(
TypeError: Got a `TypeError` when calling `PatientConsultation.objects.create()`. This may be because you have a writable field on the serializer class that is not a valid argument to `PatientConsultation.objects.create()`. You may need to make the field read-only, or override the PatientConsultationSerializer.create() method to handle this correctly.
Original exception was:
Traceback (most recent call last):
File "/venv/lib/python3.11/site-packages/rest_framework/serializers.py", line 989, in create
instance = ModelClass._default_manager.create(**validated_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/db/models/query.py", line 656, in create
obj = self.model(**kwargs)
^^^^^^^^^^^^^^^^^^^^
File "...
(13 additional frame(s) were not displayed)
...
File "care/facility/api/viewsets/patient_consultation.py", line 115, in create
return super().create(request, *args, **kwargs)
File "care/facility/api/serializers/patient_consultation.py", line 402, in create
consultation: PatientConsultation = super().create(validated_data)
The text was updated successfully, but these errors were encountered:
Sentry Issue: CARE-F9T
The text was updated successfully, but these errors were encountered: