Release v0.1.29: media previews, clean composer, regional profiles and cloud retention
This commit is contained in:
@@ -178,6 +178,14 @@ class Family:
|
||||
item[key] = value.strip()
|
||||
else:
|
||||
item[key] = a.clean_text(value, maximum, key == 'name')
|
||||
# Keep the legacy combined field verbatim. New structured locations are optional;
|
||||
# old clients updating another field must not erase them.
|
||||
for prefix in ('native', 'birth'):
|
||||
for field in ('Country', 'Province', 'City', 'District', 'Town', 'Community', 'Address'):
|
||||
key = prefix+field
|
||||
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 key in ('birthDate', 'deathDate'):
|
||||
if item[key]:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user