mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 23:02:13 -05:00
Don’t serialize nullable UUID columns to 'None'
We should return a proper `None` instead, so it gets JSONified as `null` and returns what you’d expect when doing `bool(model.field)`
This commit is contained in:
@@ -150,5 +150,9 @@ def get_dt_string_or_none(val):
|
||||
return val.strftime(DATETIME_FORMAT) if val else None
|
||||
|
||||
|
||||
def get_uuid_string_or_none(val):
|
||||
return str(val) if val else None
|
||||
|
||||
|
||||
def format_sequential_number(sequential_number):
|
||||
return format(sequential_number, "x").zfill(8)
|
||||
|
||||
Reference in New Issue
Block a user