Skip to content

Commit

Permalink
temporary fix for custom properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Dec 10, 2024
1 parent 63d7be2 commit 0d06906
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dsms/knowledge/kitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
_inspect_dataframe,
_make_annotation_schema,
_refresh_kitem,
_transform_from_flat_schema,
)

from dsms.knowledge.sparql_interface.utils import _get_subgraph # isort:skip
Expand Down Expand Up @@ -567,6 +568,11 @@ def validate_custom_properties(cls, self) -> "KItem":
raise TypeError(
f"Invalid type: {type(content)}"
) from error
# transform from flat dict. fix: replace with `_transform_from_flat_schema`
# content = _transform_from_flat_schema(
# content, self.ktype_id, from_context=True
# )
content = _transform_from_flat_schema(content)
was_in_buffer = self.id in self.context.buffers.updated
self.custom_properties = self.ktype.webform(**content)
# fix: find a better way to prehebit that properties are
Expand Down
2 changes: 1 addition & 1 deletion dsms/knowledge/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def _transform_custom_properties_schema(
ktype_spec = _get_ktype(ktype_id)

if ktype_spec:
webform = ktype_spec.get("webform")
webform = ktype_spec.webform
else:
webform = None

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dsms_sdk
version = v2.1.0dev3
version = v2.1.0dev4
description = Python SDK core-package for working with the Dataspace Management System (DSMS).
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 0d06906

Please sign in to comment.