diff --git a/awx/main/fields.py b/awx/main/fields.py index 6778e304d0..91f59bab8a 100644 --- a/awx/main/fields.py +++ b/awx/main/fields.py @@ -33,6 +33,8 @@ __all__ = ['AutoOneToOneField', 'ImplicitRoleField', 'JSONField'] class JSONField(upstream_JSONField): def from_db_value(self, value, expression, connection, context): + if value in {'', None} and not self.null: + return {} return super(JSONField, self).from_db_value(value, expression, connection, context) # Based on AutoOneToOneField from django-annoying: