Skip to content
Snippets Groups Projects
Commit 117b7682 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

ENH: allow CFoods to provide update_flags

parent 59fe61af
No related branches found
No related tags found
2 merge requests!22Release 0.3,!21ENH: allow CFoods to provide update_flags
Pipeline #15358 passed
......@@ -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.
Finish editing this message first!
Please register or to comment