Fixes in imagefield and jsonfield
This commit is contained in:
parent
a741e51a76
commit
bc05d7725e
3 changed files with 43 additions and 36 deletions
|
|
@ -72,6 +72,7 @@ class JsonValueField(PhangoField):
|
|||
super().__init__(name, required)
|
||||
|
||||
self.error_default='Sorry, the json dict is invalid'
|
||||
self.default_value={}
|
||||
|
||||
#self.set_default='NOT NULL'
|
||||
|
||||
|
|
@ -86,7 +87,7 @@ class JsonValueField(PhangoField):
|
|||
|
||||
except json.JSONDecodeError:
|
||||
|
||||
final_value={}
|
||||
final_value='{}'
|
||||
self.error=True
|
||||
self.txt_error=self.error_default
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue