Skip to content

Commit eefa59d

Browse files
committed
CI (Claude) code review feedback
1 parent b5b0d16 commit eefa59d

3 files changed

Lines changed: 1 addition & 37 deletions

File tree

src/palace/manager/celery/tasks/marc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def marc_export_reset(task: Task, library_id: int) -> None:
491491
Reset MARC export for a library so that the next export run behaves like a
492492
first run, producing both a new full export and a full-content delta.
493493
Deletes the MarcFile records and associated S3 objects for the library's
494-
MARC-enabled collections, along with the corresponding S3 objects.
494+
MARC-enabled collections.
495495
496496
The records are deleted in a single transaction, so a failure cannot leave the
497497
reset half-applied. The S3 objects are then deleted best-effort: a failed

src/palace/manager/integration/catalog/marc/exporter.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,6 @@ def _marc_enabled_collections_query(library: Library) -> Select:
184184
)
185185
)
186186

187-
@staticmethod
188-
def marc_enabled_collections(
189-
session: Session, library: Library
190-
) -> list[Collection]:
191-
"""Return all MARC-export-enabled collections associated with this library."""
192-
return (
193-
session.execute(MarcExporter._marc_enabled_collections_query(library))
194-
.scalars()
195-
.all()
196-
)
197-
198187
@staticmethod
199188
def files_for_reset(session: Session, library: Library) -> Generator[MarcFile]:
200189
"""MarcFile records for a library's MARC-enabled collections.

tests/manager/integration/catalog/marc/test_exporter.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -635,31 +635,6 @@ def test_enabled_libraries_includes_filtering_settings(
635635
assert library2_info.filtered_audiences == ()
636636
assert library2_info.filtered_genres == ()
637637

638-
def test_marc_enabled_collections(
639-
self,
640-
db: DatabaseTransactionFixture,
641-
marc_exporter_fixture: MarcExporterFixture,
642-
) -> None:
643-
library1 = marc_exporter_fixture.library1
644-
645-
# No collections have export_marc_records enabled.
646-
assert MarcExporter.marc_enabled_collections(db.session, library1) == []
647-
648-
# Enable collection1 (associated with library1) and collection3 (associated with library2 only).
649-
marc_exporter_fixture.collection1.export_marc_records = True
650-
marc_exporter_fixture.collection3.export_marc_records = True
651-
652-
result = MarcExporter.marc_enabled_collections(db.session, library1)
653-
assert result == [marc_exporter_fixture.collection1]
654-
655-
# Enable collection2, which is also associated with library1.
656-
marc_exporter_fixture.collection2.export_marc_records = True
657-
result = MarcExporter.marc_enabled_collections(db.session, library1)
658-
assert set(result) == {
659-
marc_exporter_fixture.collection1,
660-
marc_exporter_fixture.collection2,
661-
}
662-
663638
def test_files_for_reset(
664639
self,
665640
db: DatabaseTransactionFixture,

0 commit comments

Comments
 (0)