Skip to content

Commit

Permalink
Allow update on geo organization for patient
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Jan 14, 2025
1 parent 373e3c6 commit 34a0aef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions care/emr/resources/patient/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def validate_geo_organization(cls, geo_organization):
return geo_organization

def perform_extra_deserialization(self, is_update, obj):
obj.geo_organization = Organization.objects.get(
external_id=self.geo_organization
)
if not is_update:
obj.geo_organization = Organization.objects.get(
external_id=self.geo_organization
)
if self.age:
obj.year_of_birth = timezone.now().date().year - self.age
else:
Expand Down

0 comments on commit 34a0aef

Please sign in to comment.