File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def opds_import_task[FeedType](
5252 collection ,
5353 url ,
5454 apply_bibliographic = apply .bibliographic_apply .delay ,
55+ apply_circulation = apply .circulation_apply .delay ,
5556 identifier_set = identifier_set ,
5657 import_even_if_unchanged = force ,
5758 )
Original file line number Diff line number Diff line change @@ -385,10 +385,16 @@ def import_feed(
385385 )
386386 called_bibliographic_apply = True
387387 elif (
388- bibliographic .circulation is not None and apply_circulation is not None
388+ bibliographic .circulation is not None
389+ and apply_circulation is not None
390+ and (
391+ import_even_if_unchanged
392+ or bibliographic .circulation .needs_apply (session , collection )
393+ )
389394 ):
390395 circulation_data = bibliographic .circulation
391- # If the bibliographic data is unchanged, we still want to apply the circulation data
396+ # Bibliographic data is unchanged but circulation data has changed
397+ # (e.g. availability state flipped); apply only the circulation update.
392398 apply_circulation (
393399 circulation_data ,
394400 collection_id = collection .id ,
You can’t perform that action at this time.
0 commit comments