On corrige le cas des ical vides
This commit is contained in:
parent
38a7fd7e73
commit
67469cf339
@ -43,6 +43,9 @@ class DBImporterEvents:
|
||||
except:
|
||||
return (False, "JSON file is not correctly structured")
|
||||
|
||||
if len(structure) == 0:
|
||||
return (True, "")
|
||||
|
||||
if "header" not in structure:
|
||||
return (False, "JSON is not correctly structured: missing header")
|
||||
if "events" not in structure:
|
||||
|
@ -214,7 +214,7 @@ class Extractor(ABC):
|
||||
|
||||
def get_structure(self):
|
||||
if len(self.events) == 0:
|
||||
return None
|
||||
return {}
|
||||
else:
|
||||
return {"header": self.header, "events": self.events}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user