diff --git a/wcs/fields.py b/wcs/fields.py index 4de7f9db4..6856938c7 100644 --- a/wcs/fields.py +++ b/wcs/fields.py @@ -409,6 +409,16 @@ class Field(object): self.display_locations.append('listings') changed = True self.in_listing = None + if six.PY3: + # repair dictionary attributes that may have been kept as bytes in + # the initial python 2 -> 3 conversion. + from wcs.qommon.storage import deep_bytes2str + for key in ('prefill', 'data_source'): + value = getattr(self, key, None) + if not value: + continue + if b'type' in value: + setattr(self, key, deep_bytes2str(getattr(self, key))) return changed def evaluate_condition(self, dict_vars, formdef, condition):