Skip to content

Commit

Permalink
Ensure we're using the internal_value API for fields incase a field…
Browse files Browse the repository at this point in the history
… needs to override this for some reason in the future
  • Loading branch information
JeffersonBledsoe committed Feb 15, 2024
1 parent efeb8b8 commit 63bd5d0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class YesNoField(Field):
@property
def display_value(self):
if not self._display_value_mapping:
return self._value
if self._value is True:
return self.internal_value
if self.internal_value is True:
return self._display_value_mapping.get("yes")
elif self._value is False:
elif self.internal_value is False:
return self._display_value_mapping.get("no")


Expand All @@ -73,7 +73,7 @@ def send_in_email(self):

class EmailField(Field):
def validate(self, request):
if _isemail(self._value) is None:
if _isemail(self.internal_value) is None:
raise BadRequest(
translate(
_(
Expand Down

0 comments on commit 63bd5d0

Please sign in to comment.