Skip to content
Snippets Groups Projects
Commit 98da8ac3 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'f-flags' into 'dev'

ENH: allow CFoods to provide update_flags

See merge request !21
parents 59fe61af 4c09d8b8
No related branches found
No related tags found
2 merge requests!22Release 0.3,!21ENH: allow CFoods to provide update_flags
Pipeline #15563 passed
......@@ -31,6 +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
* AbtractCFood has new property, `update_flags`.
### Changed ###
......
......@@ -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):
......
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment