From 363944c8fe1b5ccafd8615cd0b578d4142c7beaa Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Sun, 21 Jan 2024 13:46:01 +0100 Subject: [PATCH] fix command initial data --- idhub/management/commands/initial_datas.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = ''