diff --git a/idhub/management/commands/initial_datas.py b/idhub/management/commands/initial_datas.py index 2dd6ad6..04c2df7 100644 --- a/idhub/management/commands/initial_datas.py +++ b/idhub/management/commands/initial_datas.py @@ -90,8 +90,11 @@ class Command(BaseCommand): ldata = json.loads(data) assert credtools.validate_schema(ldata) dname = ldata.get('name') + title = ldata.get('title') assert dname + assert title except Exception: + title = '' return name = '' try: @@ -101,7 +104,7 @@ class Command(BaseCommand): except Exception: 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): data = ''