1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 16:36:15 +00:00

fix single select bug (#6473)

This commit is contained in:
JoinTyang
2024-08-02 11:56:40 +08:00
committed by GitHub
parent 73ac3e7e69
commit b014f42bfe

View File

@@ -273,6 +273,8 @@ class MetadataRecords(APIView):
format = column_data.get('format', 'YYYY-MM-DD')
datetime_obj = datetime.strptime(value, '%Y-%m-%d %H:%M' if 'HH:mm' in format else '%Y-%m-%d')
update[column_name] = datetime_to_isoformat_timestr(datetime_obj)
elif column['type'] == 'single-select' and not value:
update[column_name] = None
else:
update[column_name] = value
except Exception as e: