Fixes search data and new activitypub fields

This commit is contained in:
Mouse Reeve
2021-04-06 18:00:54 -07:00
parent 82c2f2eeb1
commit 4112862924
3 changed files with 22 additions and 19 deletions

View File

@ -68,6 +68,10 @@ class AbstractMinimalConnector(ABC):
results.append(self.format_isbn_search_result(doc))
return results
def get_search_data(self, remote_id, **kwargs): # pylint: disable=no-self-use
""" this allows connectors to override the default behavior """
return get_data(remote_id, **kwargs)
@abstractmethod
def get_or_create_book(self, remote_id):
""" pull up a book record by whatever means possible """
@ -154,10 +158,6 @@ class AbstractConnector(AbstractMinimalConnector):
""" this allows connectors to override the default behavior """
return get_data(remote_id)
def get_search_data(self, remote_id): # pylint: disable=no-self-use
""" this allows connectors to override the default behavior """
return get_data(remote_id)
def create_edition_from_data(self, work, edition_data):
""" if we already have the work, we're ready """
mapped_data = dict_from_mappings(edition_data, self.book_mappings)