Skip to content

Commit 5492020

Browse files
committed
add missing functionality in entity_type
1 parent 56c9e0e commit 5492020

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

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.27'
2+
__version__ = '1.1.28'
33
__license__ = 'LGPL3'
44
__author__ = 'Katharina Emde'
55
__copyright__ = 'Fraunhofer IOSB'

frost_sta_client/model/ext/entity_type.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,11 @@
9898
'class': 'frost_sta_client.model.ext.entity_list.EntityList'
9999
}
100100
}
101+
102+
list_for_class = {}
103+
for key, entity_type in EntityTypes.items():
104+
list_for_class[entity_type["class"]] = entity_type["plural"]
105+
106+
def get_list_for_class(clazz):
107+
clazz_name = clazz.__module__ + "." + clazz.__name__
108+
return list_for_class[clazz_name]

0 commit comments

Comments
 (0)