diff --git a/CHANGELOG.md b/CHANGELOG.md index 627ee4e4e96626a9228a0bf319c9d1725f7e31b1..fd606c341a231d95c5d2f4d8c181ac0ab294b1da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 h5py is now an optional dependency - table importer implementations for csv and tsv - string-in-list check for table imports -- Documentation and test for the `extern` keyword used by the YAML interface +- AbtractCFood has new property, `update_flags`. ### Changed ### diff --git a/src/caosadvancedtools/cfood.py b/src/caosadvancedtools/cfood.py index c818792c79440dc1fcc78f3c0b1ed1b9bd215cb8..2c56e171d8e70789bc4f0dd3881a7d8e716e75f7 100644 --- a/src/caosadvancedtools/cfood.py +++ b/src/caosadvancedtools/cfood.py @@ -170,6 +170,7 @@ class AbstractCFood(object, metaclass=ABCMeta): self.identifiables = db.Container() self.item = item self.attached_items = [] + self.update_flags = {} @abstractmethod def create_identifiables(self): diff --git a/src/caosadvancedtools/crawler.py b/src/caosadvancedtools/crawler.py index 5a8d428655791169557f5c292d30698f6ad69798..3017f64c39147a71ed660bc5431d2aa55da7ef57 100644 --- a/src/caosadvancedtools/crawler.py +++ b/src/caosadvancedtools/crawler.py @@ -549,7 +549,8 @@ carefully and if the changes are ok, click on the following link: logger.info( "Updating {} Records...".format( len(cfood.to_be_updated))) - guard.safe_update(cfood.to_be_updated, unique=False) + guard.safe_update(cfood.to_be_updated, unique=False, + flags=cfood.update_flags) except FileNotFoundError as e: logger.info("Cannot access {}. However, it might be needed for" " the correct execution".format(e.filename))