Skip to content

Commit

Permalink
Check bad UUID when downloading csv (#4225)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput authored Sep 6, 2024
1 parent bec6c5a commit a3e2eef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bims/serializers/bio_collection_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ def get_abundance_value(self, obj):

def get_uuid(self, obj):
if obj.uuid:
return str(uuid.UUID(obj.uuid))
try:
return str(uuid.UUID(obj.uuid))
except ValueError:
return obj.uuid
return '-'

def get_user_river_name(self, obj):
Expand Down

0 comments on commit a3e2eef

Please sign in to comment.