Skip to content
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

show boolean option value to yes/no in stead of true/false #4005

Merged
merged 3 commits into from Nov 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/oscar/apps/catalogue/abstract_models.py
Expand Up @@ -1142,6 +1142,12 @@ def _entity_as_text(self):
"""
return str(self.value)

@property
def _boolean_as_text(self):
if self.value:
return (_("Yes"))
Copy link
Member

Choose a reason for hiding this comment

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

why not _("Yes")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i forgot to remove it. its fixed now

return (_("No"))

@property
def value_as_html(self):
"""
Expand Down