Skip to content

Commit c61e119

Browse files
committed
add handling for id type string
1 parent 6902517 commit c61e119

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

frost_sta_client/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = 'frost_sta_client'
2-
__version__ = '1.1.44'
2+
__version__ = '1.1.45'
33
__license__ = 'LGPL3'
44
__author__ = 'Jonathan Vogl'
55
__copyright__ = 'Fraunhofer IOSB'

frost_sta_client/service/sensorthingsservice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def get_path(self, parent, relation):
9090
if parent is None:
9191
return relation
9292
this_entity_type = entity_type.get_list_for_class(type(parent))
93-
return "{entity_type}({id})/{relation}".format(entity_type=this_entity_type, id=parent.id, relation=relation)
93+
_id = f"'{parent.id}'" if isinstance(parent.id, str) else parent.id
94+
return "{entity_type}({id})/{relation}".format(entity_type=this_entity_type, id=_id, relation=relation)
9495

9596
def get_full_path(self, parent, relation):
9697
slash = "" if self.url.pathstr[-1] == '/' else "/"

0 commit comments

Comments
 (0)