Skip to content

Commit

Permalink
Merge pull request #1474 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
org prefill
  • Loading branch information
adnankattekaden authored Oct 30, 2023
2 parents f93ea09 + 80ae8aa commit d2e4d03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions api/dashboard/organisation/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -228,8 +230,10 @@ class Meta:
"affiliation_name",
"district_id",
"district_name",
"zone_id",
"zone_name",
"state_id",
"state_name",
"country_id",
"country_name",
]
]
2 changes: 1 addition & 1 deletion api/dashboard/organisation/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# path('institutes/<str:org_type>/', organisation_views.InstitutionAPI.as_view()),
path('institutes/<str:org_type>/csv/', organisation_views.InstitutionCSVAPI.as_view()),
path('institutes/info/<str:org_code>/', organisation_views.InstitutionDetailsAPI.as_view()),
path('institutes/<str:org_code>/', organisation_views.InstitutionPrefillAPI.as_view()),
path('institutes/prefill/<str:org_code>/', organisation_views.InstitutionPrefillAPI.as_view()),
path('institutes/<str:org_type>/', organisation_views.InstitutionAPI.as_view()),
path('institutes/<str:org_type>/<str:district_id>/', organisation_views.InstitutionAPI.as_view()),
path('institutes/org/affiliation/', organisation_views.AffiliationGetPostUpdateDeleteAPI.as_view()),
Expand Down

0 comments on commit d2e4d03

Please sign in to comment.