Fixes not known category in Appliances (Fixes #1156)

This commit is contained in:
ziajka committed 2017-08-07 10:00:46 +02:00
1 parent 3caba334c0
commit 3a1fd892ac
2 files changed
+26 -1

No files matched your search

+5 -1
View File
@@ -73,12 +73,16 @@ class Appliance:
"""
Appliance data (a hash)
"""
try:
category = ID_TO_CATEGORY[self._data["category"]]
except KeyError:
category = self._data["category"]
return {
"appliance_id": self._id,
"node_type": self._data["node_type"],
"name": self._data["name"],
"default_name_format": self._data.get("default_name_format", "{name}-{0}"),
"category": ID_TO_CATEGORY[self._data["category"]],
"category": category,
"symbol": self._data.get("symbol", ":/symbols/computer.svg"),
"compute_id": self.compute_id,
"builtin": self._builtin