From 75b03b32cefae3003a472dd37a63a90cfb04c035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 22 Jan 2019 16:14:55 +0100 Subject: [PATCH] chg: Add new value --- pymispgalaxies/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pymispgalaxies/api.py b/pymispgalaxies/api.py index be635c8..f3b8709 100644 --- a/pymispgalaxies/api.py +++ b/pymispgalaxies/api.py @@ -209,6 +209,7 @@ class Cluster(collections.Mapping): self.description = self.cluster['description'] self.uuid = self.cluster['uuid'] self.version = self.cluster['version'] + self.category = self.cluster['category'] self.cluster_values = {} self.duplicates = [] for value in self.cluster['values']: @@ -255,7 +256,8 @@ class Cluster(collections.Mapping): def to_dict(self): to_return = {'name': self.name, 'type': self.type, 'source': self.source, '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()] return to_return