diff --git a/api/dashboard/organisation/serializers.py b/api/dashboard/organisation/serializers.py index 06e44034..446c68e2 100644 --- a/api/dashboard/organisation/serializers.py +++ b/api/dashboard/organisation/serializers.py @@ -209,10 +209,12 @@ def update(self, instance, validated_data): class InstitutionPrefillSerializer(serializers.ModelSerializer): - district_id = serializers.CharField(source='district.id') - district_name = serializers.CharField(source='district.name') affiliation_id = serializers.CharField(source='affiliation.id', allow_null=True) affiliation_name = serializers.CharField(source='affiliation.name', allow_null=True) + district_id = serializers.CharField(source='district.id', allow_null=True) + district_name = serializers.CharField(source='district.name', allow_null=True) + zone_id = serializers.CharField(source='district.zone.id', allow_null=True) + zone_name = serializers.CharField(source='district.zone.name', allow_null=True) state_id = serializers.CharField(source='district.state.id', allow_null=True) state_name = serializers.CharField(source='district.state.name', allow_null=True) country_id = serializers.CharField(source='district.state.country.id', allow_null=True) @@ -228,8 +230,10 @@ class Meta: "affiliation_name", "district_id", "district_name", + "zone_id", + "zone_name", "state_id", "state_name", "country_id", "country_name", - ] + ] \ No newline at end of file diff --git a/api/dashboard/organisation/urls.py b/api/dashboard/organisation/urls.py index 21b9ac6a..0bac79a8 100644 --- a/api/dashboard/organisation/urls.py +++ b/api/dashboard/organisation/urls.py @@ -10,7 +10,7 @@ # path('institutes//', organisation_views.InstitutionAPI.as_view()), path('institutes//csv/', organisation_views.InstitutionCSVAPI.as_view()), path('institutes/info//', organisation_views.InstitutionDetailsAPI.as_view()), - path('institutes//', organisation_views.InstitutionPrefillAPI.as_view()), + path('institutes/prefill//', organisation_views.InstitutionPrefillAPI.as_view()), path('institutes//', organisation_views.InstitutionAPI.as_view()), path('institutes///', organisation_views.InstitutionAPI.as_view()), path('institutes/org/affiliation/', organisation_views.AffiliationGetPostUpdateDeleteAPI.as_view()),