Skip to content

Commit

Permalink
Merge pull request #192 from deldesir/deldesir-patch-45
Browse files Browse the repository at this point in the history
Return the real shelf title
  • Loading branch information
holta authored Jun 18, 2024
2 parents d8a2748 + cad7522 commit b854132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cps/editbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ def create_shelf(current_user_name=None, shelf_title=None):
except Exception as ex:
ub.session.rollback()
log.error("Error occurred: %s", ex)
resp = {"shelf_id": shelf_id}

resp = {"shelf_id": shelf_id, "shelf_title": shelf_title}
return resp

log.info("Received metadata request: %s", request.args)
Expand Down
1 change: 1 addition & 0 deletions cps/tasks/metadata_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _send_shelf_title(self):
response = requests.get(self.original_url, params={"current_user_name": self.current_user_name, "shelf_title": self.shelf_title})
if response.status_code == 200:
self.shelf_id = response.json()["shelf_id"]
self.shelf_title = response.json()["shelf_title"]
else:
log.error("Received unexpected status code %s while sending the shelf title to %s", response.status_code, self.original_url)
except Exception as e:
Expand Down

0 comments on commit b854132

Please sign in to comment.