fix(download): tolerate dl_result without post_record_paths
CI / lint (push) Successful in 3s
CI / frontend-build (push) Successful in 25s
CI / backend-lint-and-test (push) Successful in 36s
CI / integration (push) Successful in 3m9s

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:
2026-06-14 12:50:34 -04:00
parent 796e92540a
commit ca25f688c3
+1 -1
View File
@@ -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