From 9b4c04565cc3a61ac1ed2a2b4de9d5a00bc2ceae Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 18 Feb 2022 13:45:53 +0100 Subject: make "uuid" an optional property --- src/hydrilla/builder/build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/hydrilla/builder') diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py index 58fe1b2..2824e9b 100644 --- a/src/hydrilla/builder/build.py +++ b/src/hydrilla/builder/build.py @@ -253,9 +253,10 @@ class Build: Return a minimal item reference suitable for using in source description. """ - copy_props = ['type', 'identifier', 'long_name', 'uuid', 'description'] - if 'comment' in item_def: - copy_props.append('comment') + copy_props = ['type', 'identifier', 'long_name', 'description'] + for prop in ('comment', 'uuid'): + if prop in item_def: + copy_props.append(prop) if item_def['type'] == 'resource': item_list = self.resource_list -- cgit v1.2.3