Skip to content

Commit

Permalink
stop generating the cnx id for books
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Jan 8, 2025
1 parent 55a243c commit 0ac357e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions books/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,9 +1010,6 @@ def book_urls(self):
return book_urls

def save(self, *args, **kwargs):
if self.cnx_id:
self.webview_link = '{}contents/{}'.format(settings.CNX_URL, self.cnx_id)

if self.partner_list_label:
Book.objects.filter(locale=self.locale).update(partner_list_label=self.partner_list_label)

Expand Down Expand Up @@ -1059,7 +1056,7 @@ def get_url_parts(self, *args, **kwargs):
return None

site_id, site_root_url, page_url_relative_to_site_root = url_parts
return (site_id, site_root_url, '/details/books/{}'.format(self.slug))
return site_id, site_root_url, '/details/books/{}'.format(self.slug)

Check warning on line 1059 in books/models.py

View check run for this annotation

Codecov / codecov/patch

books/models.py#L1059

Added line #L1059 was not covered by tests

def __str__(self):
return self.book_title
Expand Down

0 comments on commit 0ac357e

Please sign in to comment.