Skip to content

Commit

Permalink
added if exists to serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
lunamoonmoon committed Jul 30, 2024
1 parent 8e4c00a commit b37cb45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/backend/wells/serializers_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_artesian(self, obj):
return obj.artesian_conditions

def get_well_status(self, obj):
return obj.well_status_code.description
return obj.well_status_code.description if obj.well_status_code else None

class WellVerticalAquiferExtentSerializerV2(serializers.ModelSerializer):
aquifer_id = serializers.IntegerField()
Expand Down

0 comments on commit b37cb45

Please sign in to comment.