Skip to content
Snippets Groups Projects

add datatype, unit and description to properties that are part of Records

Merged Alexander Schlemmer requested to merge f-add-datatypes into dev
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -352,14 +352,14 @@ debug : bool, optional
model_prop = self.model[prop.name]
# The information must be missing, we don't want to overwrite it accidentally:
if prop.datatype is not None and prop.datatype != model_prop.datatype:
# breakpoint()
raise RuntimeError("datatype must not be set, here. This is probably a bug.")
continue
# TODO: Data type overwrite is allowed here (because
# of lists), but this might change in the future.
# raise RuntimeError("datatype must not be set, here. This is probably a bug.")
if prop.unit is not None and prop.unit != model_prop.unit:
# continue
raise RuntimeError("unit must not be set, here. This is probably a bug.")
continue
if prop.description is not None and prop.description != model_prop.description:
# continue
raise RuntimeError("description must not be set, here. This is probably a bug.")
continue
# If this property has a more detailed definition in the model,
# copy over the information:
Loading