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

Merge branch 'f-force-identifiables' into 'dev'

FIX: Ignore obligatory properties when inserting identifiables

See merge request !5
parents e0b81504 f8c41d87
No related branches found
No related tags found
2 merge requests!22Release 0.3,!5FIX: Ignore obligatory properties when inserting identifiables
Pipeline #9859 passed
......@@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fixed an issue where `caosadvancedtools.cache.UpdateCache` would
cause an `sqlite3.IntegrityError` if more than one change was cached
for the same entity.
* #40 Insertion of identifiables with missing obligatory properties
### Security ###
......
......@@ -89,5 +89,6 @@ def test_crawler_with_data_model_problems():
# There should be datamodel problems
assert len(DataModelProblems.missing) > 0
# Deleted entities should have been identified:
assert deleted_entities.issubset(DataModelProblems.missing)
assert DataModelProblems.missing.issubset(deleted_entities)
......@@ -610,7 +610,8 @@ carefully and if the changes are ok, click on the following link:
logger.info(
"Inserting {} Records...".format(
len(missing_identifiables)))
guard.safe_insert(missing_identifiables, unique=False)
guard.safe_insert(missing_identifiables, unique=False,
flags={"force-missing-obligatory": "ignore"})
except Exception as e:
DataModelProblems.evaluate_exception(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment