fix(ui): shrink badges, card_number format XX-1234567, date-only fields
This commit is contained in:
@@ -199,7 +199,10 @@ def postcard_create(
|
||||
try:
|
||||
return datetime.fromisoformat(s)
|
||||
except ValueError:
|
||||
return None
|
||||
try:
|
||||
return datetime.strptime(s, "%Y-%m-%d")
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
pc = Postcard(
|
||||
profile_id=profile_id,
|
||||
@@ -274,7 +277,10 @@ def postcard_update(
|
||||
try:
|
||||
return datetime.fromisoformat(s)
|
||||
except ValueError:
|
||||
return None
|
||||
try:
|
||||
return datetime.strptime(s, "%Y-%m-%d")
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
pc.card_number = card_number
|
||||
pc.status = status
|
||||
|
||||
Reference in New Issue
Block a user