fix packageio color loading
This commit is contained in:
parent
858ab2740d
commit
e48c6b2d04
2 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,7 @@ class LocationModelMixin(Location):
|
|||
raise ValueError('can_describe has to be boolean!')
|
||||
kwargs['can_describe'] = can_describe
|
||||
|
||||
if 'color' not in data:
|
||||
if 'color' in data:
|
||||
color = data['color']
|
||||
if not isinstance(color, str):
|
||||
raise ValueError('color has to be str!')
|
||||
|
|
|
@ -142,6 +142,7 @@ class ReaderItem:
|
|||
try:
|
||||
add_data = self.model.fromfile(self.json_data, self.path_in_package)
|
||||
except Exception as e:
|
||||
raise
|
||||
raise CommandError('Could not load data: %s' % e)
|
||||
self.data.update(add_data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue