diff --git a/squirrelbattle/settings.py b/squirrelbattle/settings.py index b5e2c14..549fc5f 100644 --- a/squirrelbattle/settings.py +++ b/squirrelbattle/settings.py @@ -73,7 +73,8 @@ class Settings: """ d = json.loads(json_str) for key in d: - setattr(self, key, d[key]) + if hasattr(self, key): + setattr(self, key, d[key]) def dumps_to_string(self) -> str: """