mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 11:14:52 +02:00
fix: tolerate invalid member dates in views
This commit is contained in:
@@ -79,9 +79,13 @@ def normalize_date_input(value: str, field_name: str) -> str:
|
||||
|
||||
|
||||
def format_date_for_display(value: str) -> str:
|
||||
if not value.strip():
|
||||
text = value.strip()
|
||||
if not text:
|
||||
return ""
|
||||
parsed = parse_iso_date(value, "Datum")
|
||||
try:
|
||||
parsed = parse_iso_date(text, "Datum")
|
||||
except DateValidationError:
|
||||
return text
|
||||
return parsed.strftime(system_date_pattern()) if parsed else ""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user