-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace sqlalchemy backref parameter with back_populates #2194
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,9 +236,7 @@ def content(cls, work: Work | None) -> str: | |
and work.summary.representation | ||
and work.summary.representation.content | ||
): | ||
content = work.summary.representation.content | ||
if isinstance(content, bytes): | ||
content = content.decode("utf-8") | ||
content = work.summary.representation.content.decode("utf-8") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The typing changes here made it clear that |
||
work.summary_text = content | ||
summary = work.summary_text | ||
return summary | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,7 +365,7 @@ def annotate_work_entry( | |
updated: datetime.datetime | None = None, | ||
) -> None: | ||
work = entry.work | ||
identifier = entry.identifier or work.presentation_edition.primary_identifier | ||
identifier = entry.identifier | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
active_license_pool = entry.license_pool or self.active_licensepool_for(work) | ||
# If OpenSearch included a more accurate last_update_time, | ||
# use it instead of Work.last_update_time | ||
|
@@ -875,7 +875,7 @@ def annotate_work_entry( | |
return | ||
|
||
work = entry.work | ||
identifier = entry.identifier or work.presentation_edition.primary_identifier | ||
identifier = entry.identifier | ||
|
||
permalink_uri, permalink_type = self.permalink_for(identifier) | ||
# TODO: Do not force OPDS types | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because presentation_edition can be
None
, this type hint needed to be updated.