fix command initial data
This commit is contained in:
parent
b63060ad31
commit
363944c8fe
|
@ -90,8 +90,11 @@ class Command(BaseCommand):
|
||||||
ldata = json.loads(data)
|
ldata = json.loads(data)
|
||||||
assert credtools.validate_schema(ldata)
|
assert credtools.validate_schema(ldata)
|
||||||
dname = ldata.get('name')
|
dname = ldata.get('name')
|
||||||
|
title = ldata.get('title')
|
||||||
assert dname
|
assert dname
|
||||||
|
assert title
|
||||||
except Exception:
|
except Exception:
|
||||||
|
title = ''
|
||||||
return
|
return
|
||||||
name = ''
|
name = ''
|
||||||
try:
|
try:
|
||||||
|
@ -101,7 +104,7 @@ class Command(BaseCommand):
|
||||||
except Exception:
|
except Exception:
|
||||||
return
|
return
|
||||||
|
|
||||||
Schemas.objects.create(file_schema=file_name, data=data, type=name)
|
Schemas.objects.create(file_schema=file_name, data=data, type=title)
|
||||||
|
|
||||||
def open_file(self, file_name):
|
def open_file(self, file_name):
|
||||||
data = ''
|
data = ''
|
||||||
|
|
Loading…
Reference in New Issue