Skip to content

Commit

Permalink
[squash me] Attempt to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fernflower committed Jul 29, 2022
1 parent 0adf20a commit ef77e56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions leapp/models/fields/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class ByteString(BuiltinField):
"""
@property
def _model_type(self):
return six.binary_type
return six.string_types + (six.binary_type,)

def _convert_to_model(self, value, name):
self._validate_model_value(value=value, name=name)
Expand All @@ -259,7 +259,7 @@ def _convert_from_model(self, value, name):
self._validate_model_value(value=value, name=name)
if not value:
return value

# NOTE(ivasilev) b64 encoding is always ascii, thus ascii decoding to get a string
return base64.b64encode(value).decode('ascii')


Expand Down

0 comments on commit ef77e56

Please sign in to comment.