kin: KIN-067 При попытке сохранить настройки и синхронизироваться с обсидианом через настройки ошибка 'Sync error: Error: 400 Bad Request'. Разобраться с проблемой. Синхронизация работает в обе стороны.
This commit is contained in:
parent
81f974e6d3
commit
993362341b
5 changed files with 106 additions and 18 deletions
|
|
@ -24,6 +24,15 @@ PERMISSION_PATTERNS = [
|
|||
]
|
||||
|
||||
|
||||
def _next_task_id(
|
||||
conn: sqlite3.Connection,
|
||||
project_id: str,
|
||||
category: str | None = None,
|
||||
) -> str:
|
||||
"""Thin wrapper around models.next_task_id for testability."""
|
||||
return models.next_task_id(conn, project_id, category=category)
|
||||
|
||||
|
||||
def _is_permission_blocked(item: dict) -> bool:
|
||||
"""Check if a follow-up item describes a permission/write failure."""
|
||||
text = f"{item.get('title', '')} {item.get('brief', '')}".lower()
|
||||
|
|
@ -139,7 +148,7 @@ def generate_followups(
|
|||
"options": ["rerun", "manual_task", "skip"],
|
||||
})
|
||||
else:
|
||||
new_id = models.next_task_id(conn, project_id)
|
||||
new_id = _next_task_id(conn, project_id, category=task.get("category"))
|
||||
brief_dict = {"source": f"followup:{task_id}"}
|
||||
if item.get("type"):
|
||||
brief_dict["route_type"] = item["type"]
|
||||
|
|
@ -152,6 +161,7 @@ def generate_followups(
|
|||
priority=item.get("priority", 5),
|
||||
parent_task_id=task_id,
|
||||
brief=brief_dict,
|
||||
category=task.get("category"),
|
||||
)
|
||||
created.append(t)
|
||||
|
||||
|
|
@ -191,7 +201,7 @@ def resolve_pending_action(
|
|||
return None
|
||||
|
||||
if choice == "manual_task":
|
||||
new_id = models.next_task_id(conn, project_id)
|
||||
new_id = _next_task_id(conn, project_id, category=task.get("category"))
|
||||
brief_dict = {"source": f"followup:{task_id}", "task_type": "manual_escalation"}
|
||||
if item.get("type"):
|
||||
brief_dict["route_type"] = item["type"]
|
||||
|
|
@ -203,6 +213,7 @@ def resolve_pending_action(
|
|||
priority=item.get("priority", 5),
|
||||
parent_task_id=task_id,
|
||||
brief=brief_dict,
|
||||
category=task.get("category"),
|
||||
)
|
||||
|
||||
if choice == "rerun":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue