257 files
This commit is contained in:
@@ -65,6 +65,9 @@ _TASK_STR_LIMITS: dict[str, int] = {
|
||||
# crafted backup can't smuggle oversized strings past the importer.
|
||||
"archived_at": MAX_META_LENGTH,
|
||||
"archived_reason": MAX_META_LENGTH,
|
||||
# #193: a single task's pause (the object's markers).
|
||||
"paused_at": MAX_META_LENGTH,
|
||||
"paused_until": MAX_DATE_LENGTH,
|
||||
"schedule_time": MAX_SCHEDULE_TIME_LENGTH,
|
||||
"priority": MAX_TYPE_LENGTH,
|
||||
"reading_unit": MAX_READING_UNIT_LENGTH,
|
||||
@@ -120,6 +123,9 @@ _FRESH_COPY_STRIP_KEYS = (
|
||||
"adaptive_config",
|
||||
"archived_at",
|
||||
"archived_reason",
|
||||
# #193: a copy starts un-paused.
|
||||
"paused_at",
|
||||
"paused_until",
|
||||
# #170: a copy is a new task — it gets its own reference number.
|
||||
"ref_no",
|
||||
# Dynamic state like the history (storage._DYNAMIC_TASK_FIELDS, pinned by
|
||||
@@ -127,6 +133,10 @@ _FRESH_COPY_STRIP_KEYS = (
|
||||
# checklist from the beginning (DRY audit 2026-09-26 B).
|
||||
"phase_cursor",
|
||||
"checklist_progress",
|
||||
# The fleet's replacement log / low latch ride entry.data only on an
|
||||
# import (storage._SPLIT_ONLY_TASK_FIELDS); a copy never carries them.
|
||||
"battery_replacements",
|
||||
"battery_low_latch",
|
||||
)
|
||||
|
||||
|
||||
@@ -333,7 +343,8 @@ def seed_rotation_assignee(task_data: dict[str, Any]) -> None:
|
||||
pool member when the assignee is missing — or no longer in the pool
|
||||
(the pool was edited out from under the current assignee).
|
||||
"""
|
||||
pool = [u for u in task_data.get("assignee_pool") or [] if u]
|
||||
raw_pool = task_data.get("assignee_pool")
|
||||
pool = [u for u in raw_pool if isinstance(u, str) and u] if isinstance(raw_pool, list) else []
|
||||
if not pool or not task_data.get("rotation_strategy"):
|
||||
return
|
||||
current = task_data.get("responsible_user_id")
|
||||
|
||||
Reference in New Issue
Block a user