fix(download): tolerate dl_result without post_record_paths
The test_download_service stubs build dl_result as a SimpleNamespace that doesn't set the new field; read it via getattr (matching the existing retry_after_seconds pattern) so phase 3 doesn't AttributeError on stubs or any caller that predates the field.
This commit is contained in:
@@ -384,7 +384,7 @@ class DownloadService:
|
||||
# captured so the artist archive is complete. Upsert each (keyed on
|
||||
# external_post_id → updates the same Post a media import would create,
|
||||
# never doubles). No file to clean up; the sidecar stays on disk.
|
||||
for rec_str in dl_result.post_record_paths or []:
|
||||
for rec_str in getattr(dl_result, "post_record_paths", None) or []:
|
||||
rec_path = Path(rec_str)
|
||||
if not rec_path.exists(): # noqa: ASYNC240
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user