Add hierarchical geography and cloud-hosted profile images
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""A private family register, independent from login accounts and camera roles."""
|
||||
import geography
|
||||
import datetime as dt
|
||||
import json
|
||||
import secrets
|
||||
@@ -186,6 +187,8 @@ class Family:
|
||||
value = data.get(key, (old or {}).get(key, ''))
|
||||
if not isinstance(value, str): raise a.Problem('地域信息须为文字')
|
||||
item[key] = a.clean_text(value, 200 if field == 'Address' else 80)
|
||||
for prefix in ('native', 'birth'):
|
||||
geography.apply(item, data, old, a.clean_text, a.Problem, prefix)
|
||||
for key in ('birthDate', 'deathDate'):
|
||||
if item[key]:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user