Units are not updated by `DataModel.sync_data_model`
Summary
When re-defining a property in, e.g., a datamodel.yml
with a different unit than the already existing property, the unit is not updated.
Expected Behavior
The unit should be updated.
Actual Behavior
sync_data_model
doesn't see any necessary changes.
Steps to Reproduce the Problem
Consider
import caosdb as db
from caosadvancedtools.models.parser import parse_model_from_string
db.Property(name="TestProp", datatype="INTEGER", unit="m").insert()
model = """
TestProp:
datatype: INTEGER
unit: cm
"""
entities = parse_model_from_string(model)
entities.sync_data_model()
Results in
No new entities.
Inspecting changes that will be made...
No differences found. No update
Specifications
- Version:
dev