validate wifi scan data
This commit is contained in:
parent
ccd00ce6c7
commit
f141a9deb7
2 changed files with 37 additions and 2 deletions
|
@ -121,7 +121,9 @@ class JSONField(models.TextField):
|
|||
return json.loads(value)
|
||||
|
||||
def to_python(self, value):
|
||||
return json.loads(value)
|
||||
if isinstance(value, str):
|
||||
return json.loads(value)
|
||||
return value
|
||||
|
||||
def get_prep_value(self, value):
|
||||
return json.dumps(value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue