admin: make YAMLField return empty dict when empty yaml is given
This commit is contained in:
@ -53,6 +53,8 @@ class YAMLField(forms.JSONField):
|
||||
)
|
||||
if isinstance(converted, str):
|
||||
return YAMLString(converted)
|
||||
if converted is None:
|
||||
return {}
|
||||
return converted
|
||||
|
||||
def bound_data(self, data, initial):
|
||||
|
||||
Reference in New Issue
Block a user