diff --git a/care/emr/resources/patient/spec.py b/care/emr/resources/patient/spec.py index 7c0850103c..d52ce2b317 100644 --- a/care/emr/resources/patient/spec.py +++ b/care/emr/resources/patient/spec.py @@ -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: