Add .get to call for d[date]
This commit is contained in:
parent
092aef88ce
commit
fdaae59b59
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def as_annotation(*, raw_ann, path: str) -> Annotation:
|
||||||
for a in ('boxes', 'rect'):
|
for a in ('boxes', 'rect'):
|
||||||
if a in d:
|
if a in d:
|
||||||
del d[a]
|
del d[a]
|
||||||
dates = d['date']
|
dates = d.get('date')
|
||||||
date: Optional[datetime] = None
|
date: Optional[datetime] = None
|
||||||
if dates is not None:
|
if dates is not None:
|
||||||
dates = dates.replace("'", "")
|
dates = dates.replace("'", "")
|
||||||
|
|
Loading…
Add table
Reference in a new issue