diff options
Diffstat (limited to 'src/hydrilla/server')
-rw-r--r-- | src/hydrilla/server/serve.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py index bb53c0a..9bcfb93 100644 --- a/src/hydrilla/server/serve.py +++ b/src/hydrilla/server/serve.py @@ -57,7 +57,7 @@ class ItemInfo(ABC): """Initialize ItemInfo using item definition read from JSON.""" self.version = util.normalize_version(item_obj['version']) self.identifier = item_obj['identifier'] - self.uuid = item_obj['uuid'] + self.uuid = item_obj.get('uuid') self.long_name = item_obj['long_name'] def path(self) -> str: @@ -111,8 +111,11 @@ class VersionedItemInfo: """ if self.identifier is None: self.identifier = item_info.identifier + + if self.uuid is None: self.uuid = item_info.uuid - elif self.uuid != item_info.uuid: + + if self.uuid is not None and self.uuid != item_info.uuid: raise ValueError(f_('uuid_mismatch_{identifier}') .format(identifier=self.identifier)) |