mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Merge branch 'main' into production
This commit is contained in:
commit
3795d682aa
2 changed files with 5 additions and 4 deletions
|
@ -40,8 +40,9 @@ def search(query, min_confidence=0.1):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
result_set = connector.isbn_search(isbn)
|
result_set = connector.isbn_search(isbn)
|
||||||
except (HTTPError, ConnectorException):
|
except Exception as e: # pylint: disable=broad-except
|
||||||
pass
|
logger.exception(e)
|
||||||
|
continue
|
||||||
|
|
||||||
# if no isbn search or results, we fallback to generic search
|
# if no isbn search or results, we fallback to generic search
|
||||||
if result_set in (None, []):
|
if result_set in (None, []):
|
||||||
|
|
|
@ -385,7 +385,7 @@ class CollectionItemMixin(ActivitypubMixin):
|
||||||
object_field = getattr(self, self.object_field)
|
object_field = getattr(self, self.object_field)
|
||||||
collection_field = getattr(self, self.collection_field)
|
collection_field = getattr(self, self.collection_field)
|
||||||
return activitypub.Add(
|
return activitypub.Add(
|
||||||
id=self.remote_id,
|
id=self.get_remote_id(),
|
||||||
actor=self.user.remote_id,
|
actor=self.user.remote_id,
|
||||||
object=object_field,
|
object=object_field,
|
||||||
target=collection_field.remote_id,
|
target=collection_field.remote_id,
|
||||||
|
@ -396,7 +396,7 @@ class CollectionItemMixin(ActivitypubMixin):
|
||||||
object_field = getattr(self, self.object_field)
|
object_field = getattr(self, self.object_field)
|
||||||
collection_field = getattr(self, self.collection_field)
|
collection_field = getattr(self, self.collection_field)
|
||||||
return activitypub.Remove(
|
return activitypub.Remove(
|
||||||
id=self.remote_id,
|
id=self.get_remote_id(),
|
||||||
actor=self.user.remote_id,
|
actor=self.user.remote_id,
|
||||||
object=object_field,
|
object=object_field,
|
||||||
target=collection_field.remote_id,
|
target=collection_field.remote_id,
|
||||||
|
|
Loading…
Reference in a new issue