fix: default task deadline to date only
ci / docker (push) Successful in 4m33s

This commit is contained in:
2026-09-08 09:24:00 +08:00
parent 113791229a
commit 972c4e1fb8
9 changed files with 68 additions and 12 deletions
+2 -1
View File
@@ -809,7 +809,7 @@ async def export_json(user: User = Depends(current_user), db: AsyncSession = Dep
"exported_at": utcnow(),
"folders": [serialize(x, ["id", "name", "position", "deleted_at"]) for x in folders],
"lists": [serialize(x, ["id", "folder_id", "name", "is_inbox", "position", "deleted_at"]) for x in lists],
"tasks": [serialize(x, ["id", "list_id", "parent_id", "title", "description", "priority", "completed", "due_at", "external_id", "deleted_at"]) for x in tasks],
"tasks": [serialize(x, ["id", "list_id", "parent_id", "title", "description", "priority", "completed", "due_at", "due_has_time", "external_id", "deleted_at"]) for x in tasks],
"recurrences": [serialize(x, ["id", "task_id", "rrule", "starts_at", "ends_at"]) for x in recurrences],
"habits": [serialize(x, ["id", "name", "kind", "target", "max_value", "schedule_type", "weekdays", "month_days", "interval_days", "start_date", "archived_at", "position"]) for x in habits],
"countdowns": [serialize(x, ["id", "title", "event_date", "calendar_mode", "lunar_month", "lunar_day", "ignore_year", "kind", "repeat_rule", "icon", "pinned", "archived_at", "created_at", "updated_at"]) for x in countdowns],
@@ -868,6 +868,7 @@ async def restore_json(payload: dict, mode: str = Query("merge", pattern="^(merg
priority=raw.get("priority", 0),
completed=raw.get("completed", False),
due_at=datetime.fromisoformat(raw["due_at"]) if raw.get("due_at") else None,
due_has_time=raw.get("due_has_time", True),
external_id=ext,
)
db.add(row)