fix for project files written to wrong directory
This commit is contained in:
@@ -551,12 +551,16 @@ class ChatGPTProvider(BaseProvider):
|
||||
created_at = _ts_to_iso(raw.get("create_time"))
|
||||
updated_at = _ts_to_iso(raw.get("update_time"))
|
||||
|
||||
# Look up project name from the map built during fetch_all_conversations.
|
||||
project = self._project_map.get(conv_id) if conv_id else None
|
||||
# Prefer _project_name annotation injected from the listing summary
|
||||
# (propagated by the export loop). Fall back to _project_map lookup.
|
||||
project = raw.get("_project_name") or (
|
||||
self._project_map.get(conv_id) if conv_id else None
|
||||
)
|
||||
logger.debug(
|
||||
"[chatgpt] normalize_conversation[%s]: project_map lookup → %r",
|
||||
"[chatgpt] normalize_conversation[%s]: project=%r (source=%s)",
|
||||
conv_id[:8] if conv_id else "?",
|
||||
project,
|
||||
"_project_name" if raw.get("_project_name") else "_project_map",
|
||||
)
|
||||
|
||||
mapping: dict = raw.get("mapping", {})
|
||||
|
||||
Reference in New Issue
Block a user