Skip to content

Commit

Permalink
fix: districtadmin can't set shifting patient status as completed (#1268
Browse files Browse the repository at this point in the history
)
  • Loading branch information
aeswibon authored Apr 27, 2023
1 parent 4ff0591 commit 80c6632
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions care/facility/api/serializers/shifting.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ShiftingSerializer(serializers.ModelSerializer):
"TRANSPORTATION TO BE ARRANGED",
"PATIENT TO BE PICKED UP",
"TRANSFER IN PROGRESS",
# "COMPLETED",
"COMPLETED",
"PATIENT EXPIRED",
]
]
Expand Down Expand Up @@ -142,7 +142,9 @@ class ShiftingSerializer(serializers.ModelSerializer):
id = serializers.UUIDField(source="external_id", read_only=True)

patient = ExternalIdSerializerField(
queryset=PatientRegistration.objects.all(), allow_null=False, required=True
queryset=PatientRegistration.objects.all(),
allow_null=False,
required=True,
)
patient_object = PatientListSerializer(source="patient", read_only=True)

Expand Down Expand Up @@ -383,4 +385,8 @@ def create(self, validated_data):
class Meta:
model = ShiftingRequestComment
exclude = ("deleted", "request")
read_only_fields = TIMESTAMP_FIELDS + ("created_by", "external_id", "id")
read_only_fields = TIMESTAMP_FIELDS + (
"created_by",
"external_id",
"id",
)

0 comments on commit 80c6632

Please sign in to comment.