fix packageio color loading

This commit is contained in:
Laura Klünder 2016-12-24 23:22:00 +01:00
parent 858ab2740d
commit e48c6b2d04
2 changed files with 2 additions and 1 deletions

View file

@ -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!')

View file

@ -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)