fix(ui): shrink badges, card_number format XX-1234567, date-only fields

This commit is contained in:
2026-07-05 16:26:22 +08:00
parent 4ad37a71f7
commit e66515ce72
4 changed files with 18 additions and 12 deletions

View File

@@ -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