[models] deepcopy EGLManifest input data

This commit is contained in:
derrod 2020-05-29 23:06:15 +02:00
parent 4ace27bbcc
commit e8a2df75fd

View file

@ -1,3 +1,4 @@
from copy import deepcopy
from distutils.util import strtobool from distutils.util import strtobool
from legendary.models.game import InstalledGame, Game from legendary.models.game import InstalledGame, Game
@ -73,6 +74,7 @@ class EGLManifest:
@classmethod @classmethod
def from_json(cls, json: dict): def from_json(cls, json: dict):
json = deepcopy(json)
tmp = cls() tmp = cls()
tmp.app_name = json.pop('AppName') tmp.app_name = json.pop('AppName')
tmp.app_version_string = json.pop('AppVersionString', None) tmp.app_version_string = json.pop('AppVersionString', None)