Skip to content

Commit

Permalink
Raise error on updating discharged patient
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Aug 12, 2020
1 parent e1ab396 commit d109e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion care/facility/api/serializers/patient_consultation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def validate_bed_number(self, bed_number):

def update(self, instance, validated_data):
if instance.discharge_date:
return ValidationError({"consultation": [f"Discharged Consultation data cannot be updated"]})
raise ValidationError({"consultation": [f"Discharged Consultation data cannot be updated"]})

if instance.suggestion == SuggestionChoices.OP:
instance.discharge_date = localtime(now())
Expand Down

0 comments on commit d109e67

Please sign in to comment.