diff --git a/Common/kgxmodel.py b/Common/kgxmodel.py index 1813a5a..1ce3b41 100644 --- a/Common/kgxmodel.py +++ b/Common/kgxmodel.py @@ -103,10 +103,11 @@ def __post_init__(self, source_version, get_source_version): raise Exception(f'Invalid DataSource initialization - ' f'source_version or get_source_version must be provided.') - # when + # when the source_version attribute is accessed either return _source_version if it is set + # or call the function supplied to retrieve it def __getattribute__(self, name): if name == "source_version": - if not self._source_version: + if self._source_version is None: self._source_version = self._get_source_version(self.id) return self._source_version else: