Skip to content

Commit

Permalink
Merge pull request #1128 from kartoza/feature/1100-csv-status
Browse files Browse the repository at this point in the history
Fix Status in admin observation CSV export
  • Loading branch information
tinashechiraya authored Oct 18, 2024
2 parents 2fc2dbd + 29811ba commit f6d6c09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django_project/monitor/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ def download_records(self, request, queryset):
])

for obs in queryset:
if obs.flag == 'clean':
flag = 'Verified'
else:
flag = 'Unverified'
try:
user_profile = obs.user.userprofile
user_organization_name = user_profile.organisation_name
Expand Down Expand Up @@ -161,6 +165,7 @@ def download_records(self, request, queryset):
smart_str(obs.true_flies),
smart_str(obs.snails),
smart_str(obs.score),
smart_str(flag),
smart_str(obs.water_clarity),
smart_str(obs.water_temp),
smart_str(obs.ph),
Expand Down

0 comments on commit f6d6c09

Please sign in to comment.