Skip to content

Commit

Permalink
Remove defining date_of_birth and year_of_birth serializer fields (
Browse files Browse the repository at this point in the history
…#2112)

* fixes coronasafe/care_fe#7693

* update tests
  • Loading branch information
rithviknishad committed Apr 23, 2024
1 parent eda8931 commit 10f2edd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions care/facility/api/serializers/patient.py
Expand Up @@ -218,9 +218,6 @@ class Meta:
)
abha_number_object = AbhaNumberSerializer(source="abha_number", read_only=True)

date_of_birth = serializers.DateField(required=False, allow_null=True)
year_of_birth = serializers.IntegerField(default=0)

class Meta:
model = PatientRegistration
exclude = (
Expand Down
2 changes: 2 additions & 0 deletions care/facility/models/tests/test_patient.py
Expand Up @@ -35,6 +35,7 @@ def test_date_of_birth_validation(self):
"blood_group": "AB+",
"gender": 1,
"date_of_birth": now().date() + timedelta(days=365),
"year_of_birth": None,
"disease_status": "NEGATIVE",
"emergency_phone_number": "+919000000666",
"is_vaccinated": "false",
Expand All @@ -52,6 +53,7 @@ def test_year_of_birth_validation(self):
"facility": self.facility.external_id,
"blood_group": "AB+",
"gender": 1,
"date_of_birth": None,
"year_of_birth": now().year + 1,
"disease_status": "NEGATIVE",
"emergency_phone_number": "+919000000666",
Expand Down

0 comments on commit 10f2edd

Please sign in to comment.