Skip to content

Commit e199407

Browse files
Merge pull request #1674 from IFRCGo/feature/1672-add-iso3-to-district-and-appeal
Add ISO3 to District and Appeal endpoint parameters
2 parents ea93947 + e3a85e1 commit e199407

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/drf_views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def get_serializer_class(self):
338338
class DistrictFilter(filters.FilterSet):
339339
class Meta:
340340
model = District
341-
fields = ('country',)
341+
fields = ('country', 'country__iso3', 'name',)
342342

343343

344344
class DistrictViewset(viewsets.ReadOnlyModelViewSet):
@@ -573,6 +573,7 @@ class Meta:
573573
'valid_from': ('exact', 'gt', 'gte', 'lt', 'lte'),
574574
'valid_to': ('exact', 'gt', 'gte', 'lt', 'lte'),
575575
'appeal__real_data_update': ('exact', 'gt', 'gte', 'lt', 'lte'),
576+
'country__iso3': ('exact',),
576577
}
577578

578579

0 commit comments

Comments
 (0)