Fix bug with update (#938)

This commit is contained in:
Pascal Vizeli 2019-03-07 21:09:43 +01:00 committed by GitHub
parent 5cefa0a2ee
commit fc45670686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,10 @@ class Addon(CoreSysAttributes):
def _set_update(self, image: str, version: str) -> None:
"""Update version of add-on."""
self._data.system[self._id] = deepcopy(self._data.cache[self._id])
self._data.user[self._id][ATTR_VERSION] = version
self._data.user[self._id].update({
ATTR_VERSION: version,
ATTR_IMAGE: image,
})
self.save_data()
def _restore_data(self, user: Dict[str, Any], system: Dict[str, Any], image: str) -> None: