Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
580dbfa7
Commit
580dbfa7
authored
Apr 02, 2021
by
Jiahang Chen
Browse files
fix subthing id
parent
dc576c61
Pipeline
#439652
passed with stages
in 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ml/thing.py
View file @
580dbfa7
...
...
@@ -610,8 +610,6 @@ def _getValue(self, source, uri_list):
# ??? What if the uri points to a Value object?
# Shouldn't it be serialized?!
print
(
source
)
print
(
uri_list
)
value
=
source
[
uri_list
[
0
]]
if
uri_list
.
__len__
()
==
1
:
# if is ditto-feature
...
...
@@ -969,7 +967,8 @@ def to_subthing_json(self):
if
self
.
thing_id
:
json_out
[
"identifier"
]
=
self
.
thing_id
else
:
json_out
[
"identifier"
]
=
self
.
model
[
"attributes"
][
"identifier"
]
if
self
.
model
[
"attributes"
].
get
(
"identifier"
)
is
not
None
:
json_out
[
"identifier"
]
=
self
.
model
[
"attributes"
][
"identifier"
]
for
key
in
self
.
roles
.
keys
():
json_out
[
"roles"
].
append
(
self
.
roles
[
key
].
to_json
())
for
key
in
self
.
features
.
keys
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment