Skip to content

Commit

Permalink
add handling for id type string
Browse files Browse the repository at this point in the history
  • Loading branch information
vogljonathan committed Nov 8, 2023
1 parent 6902517 commit c61e119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frost_sta_client/__version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'frost_sta_client'
__version__ = '1.1.44'
__version__ = '1.1.45'
__license__ = 'LGPL3'
__author__ = 'Jonathan Vogl'
__copyright__ = 'Fraunhofer IOSB'
Expand Down
3 changes: 2 additions & 1 deletion frost_sta_client/service/sensorthingsservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def get_path(self, parent, relation):
if parent is None:
return relation
this_entity_type = entity_type.get_list_for_class(type(parent))
return "{entity_type}({id})/{relation}".format(entity_type=this_entity_type, id=parent.id, relation=relation)
_id = f"'{parent.id}'" if isinstance(parent.id, str) else parent.id
return "{entity_type}({id})/{relation}".format(entity_type=this_entity_type, id=_id, relation=relation)

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

0 comments on commit c61e119

Please sign in to comment.