From 558c9c4d675ff2675c2b88171294d52b989105d4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 5 May 2021 07:52:57 -0700 Subject: [PATCH 1/2] Sort edition list for better import results from inventaire --- bookwyrm/connectors/inventaire.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/connectors/inventaire.py b/bookwyrm/connectors/inventaire.py index 60f490f3..3f26da68 100644 --- a/bookwyrm/connectors/inventaire.py +++ b/bookwyrm/connectors/inventaire.py @@ -123,7 +123,7 @@ class Connector(AbstractConnector): def load_edition_data(self, work_uri): """get a list of editions for a work""" - url = "{:s}?action=reverse-claims&property=wdt:P629&value={:s}".format( + url = "{:s}?action=reverse-claims&property=wdt:P629&value={:s}&sort=true".format( self.books_url, work_uri ) return get_data(url) From c15358d715566e883149ac0332037b86ebce0df2 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 5 May 2021 07:58:09 -0700 Subject: [PATCH 2/2] Python formatting --- bookwyrm/connectors/inventaire.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/connectors/inventaire.py b/bookwyrm/connectors/inventaire.py index 3f26da68..0c573265 100644 --- a/bookwyrm/connectors/inventaire.py +++ b/bookwyrm/connectors/inventaire.py @@ -123,8 +123,10 @@ class Connector(AbstractConnector): def load_edition_data(self, work_uri): """get a list of editions for a work""" - url = "{:s}?action=reverse-claims&property=wdt:P629&value={:s}&sort=true".format( - self.books_url, work_uri + url = ( + "{:s}?action=reverse-claims&property=wdt:P629&value={:s}&sort=true".format( + self.books_url, work_uri + ) ) return get_data(url)