Skip to content

Commit e48b1c9

Browse files
LegendaryLinuxqwint
authored andcommitted
Use world.web.options_presets directly instead of creating an empty dict first (ArchipelagoMW#3348)
1 parent 6a9efd8 commit e48b1c9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

WebHostLib/options.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ def test_ordered(obj):
7979
@cache.cached()
8080
def option_presets(game: str) -> Response:
8181
world = AutoWorldRegister.world_types[game]
82-
presets = {}
83-
84-
if world.web.options_presets:
85-
presets = presets | world.web.options_presets
8682

8783
class SetEncoder(json.JSONEncoder):
8884
def default(self, obj):
@@ -91,7 +87,7 @@ def default(self, obj):
9187
return list(obj)
9288
return json.JSONEncoder.default(self, obj)
9389

94-
json_data = json.dumps(presets, cls=SetEncoder)
90+
json_data = json.dumps(world.web.options_presets, cls=SetEncoder)
9591
response = Response(json_data)
9692
response.headers["Content-Type"] = "application/json"
9793
return response

0 commit comments

Comments
 (0)