Skip to content

Commit

Permalink
Merge pull request #125 from mintcoding/working
Browse files Browse the repository at this point in the history
Add strip()
  • Loading branch information
mintcoding authored Jun 21, 2022
2 parents 8891cbe + 35e2f85 commit 0675900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wildlifecompliance/components/call_email/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class Meta:
def get_region_gis(self, obj):
try:
res = get_region_gis(obj.location.wkb_geometry)
region_list = Region.objects.filter(cddp_name__iexact=res)
region_list = Region.objects.filter(cddp_name__iexact=strip(res))
if region_list:
return region_list[0].name
except Exception as e:
Expand All @@ -545,7 +545,7 @@ def get_region_gis(self, obj):
def get_district_gis(self, obj):
try:
res = get_district_gis(obj.location.wkb_geometry)
district_list = District.objects.filter(cddp_name__iexact=res)
district_list = District.objects.filter(cddp_name__iexact=strip(res))
if district_list:
return district_list[0].name
except Exception as e:
Expand Down

0 comments on commit 0675900

Please sign in to comment.