Skip to content

Commit

Permalink
docs: Clarify ocid_fallback docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Dec 4, 2024
1 parent 4b109e6 commit 4c3ad75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kingfisher_scrapy/spidermiddlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ class ResizePackageMiddleware:
"""
If the spider's ``resize_package`` class attribute is ``True``, split the package into packages of 100 releases or
records each. Otherwise, yield the original item.
Optionally, implement an ocid_fallback function that returns an alternative ocid value if the ocid is not set.
Optionally, implement an ``ocid_fallback`` method on the spider, which accepts a release (or record) and returns an
an ``ocid`` value, to be used if the ``ocid`` field is not set.
"""

async def process_spider_output(self, response, result, spider):
Expand Down

0 comments on commit 4c3ad75

Please sign in to comment.