diff --git a/bookwyrm/connectors/inventaire.py b/bookwyrm/connectors/inventaire.py index 45d0546fb..a9aeb94f9 100644 --- a/bookwyrm/connectors/inventaire.py +++ b/bookwyrm/connectors/inventaire.py @@ -214,7 +214,7 @@ class Connector(AbstractConnector): def get_remote_id_from_model(self, obj): """use get_remote_id to figure out the link from a model obj""" - remote_id_value = getattr(obj, self.inventaire_id) + remote_id_value = obj.inventaire_id return self.get_remote_id(remote_id_value) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index cdfbdf983..6d8ce72b8 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -102,7 +102,15 @@
{% endif %} {% if book.inventaire_id %} -{% trans "View on Inventaire" %}
++ {% trans "View on Inventaire" %} + {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} +
+ {% endif %} + {% endif %} diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 6e53ef2ac..012a91164 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -425,12 +425,12 @@ urlpatterns = [ re_path(r"^resolve-book/?$", views.resolve_book, name="resolve-book"), re_path(r"^switch-edition/?$", views.switch_edition, name="switch-edition"), re_path( - rf"^{BOOK_PATH}/update/(?P