chg: Add new value

pull/5/head
Raphaël Vinot 2019-01-22 16:14:55 +01:00
parent 1116f2d684
commit 75b03b32ce
1 changed files with 3 additions and 1 deletions

View File

@ -209,6 +209,7 @@ class Cluster(collections.Mapping):
self.description = self.cluster['description'] self.description = self.cluster['description']
self.uuid = self.cluster['uuid'] self.uuid = self.cluster['uuid']
self.version = self.cluster['version'] self.version = self.cluster['version']
self.category = self.cluster['category']
self.cluster_values = {} self.cluster_values = {}
self.duplicates = [] self.duplicates = []
for value in self.cluster['values']: for value in self.cluster['values']:
@ -255,7 +256,8 @@ class Cluster(collections.Mapping):
def to_dict(self): def to_dict(self):
to_return = {'name': self.name, 'type': self.type, 'source': self.source, to_return = {'name': self.name, 'type': self.type, 'source': self.source,
'authors': self.authors, 'description': self.description, 'authors': self.authors, 'description': self.description,
'uuid': self.uuid, 'version': self.version, 'values': []} 'uuid': self.uuid, 'version': self.version, 'category': self.category,
'values': []}
to_return['values'] = [v for v in self.values()] to_return['values'] = [v for v in self.values()]
return to_return return to_return