Fixed bug while loading empty metadata
Change-Id: I50d6a55069f687c4b858a6056826d338db294148
This commit is contained in:
parent
b4e44f9060
commit
95ac7bd6bb
@ -116,7 +116,9 @@ class DBStateManager(object):
|
||||
def get_metadata(self):
|
||||
"""Get metadata attached to the state."""
|
||||
|
||||
return json.loads(self._db.get_metadata(self._state_name))
|
||||
data = self._db.get_metadata(self._state_name)
|
||||
if data:
|
||||
return json.loads(data)
|
||||
|
||||
def set_metadata(self, metadata):
|
||||
"""Set metadata attached to the state."""
|
||||
|
Loading…
Reference in New Issue
Block a user