Skip to content

Commit 05fa5c9

Browse files
committed
Fixed External Tests
1 parent d4977f9 commit 05fa5c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

care/facility/api/serializers/patient_external_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def validate_empty_values(self, data, *args, **kwargs):
3535

3636
local_body_obj = None
3737
if "local_body" in data and district_obj:
38+
if not data["local_body"]:
39+
raise ValidationError({"local_body": ["Local Body Cannot Be Empty"]})
3840
local_body = data["local_body"]
3941
local_body_obj = LocalBody.objects.filter(name__icontains=local_body, district=district_obj).first()
4042
if local_body_obj:

0 commit comments

Comments
 (0)