Skip to content

Conversation

edwoodward
Copy link
Contributor

No description provided.

@edwoodward edwoodward requested a review from mwvolo July 22, 2021 13:58
@edwoodward edwoodward self-assigned this Jul 22, 2021
books/models.py Outdated
def errata_content(self):
e_content = snippets.ErrataContent.objects.filter(book_state=self.book_state)
e_content = snippets.ErrataContent.objects.filter(book_state=self.book_state, locale=self.locale)
return e_content.first().content
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I missed this in the original review but don't see the need for a variable here, recommended changing to

def errata_content(self):
	return snippets.ErrataContent.objects.filter(book_state=self.book_state, locale=self.locale).first().content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side effect of me figuring out what is being returned and getting the correct value. It is fixed.

@edwoodward edwoodward merged commit ebacea5 into master Jul 22, 2021
@edwoodward edwoodward deleted the translate-errata-content branch July 22, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants