Island: Simplify logic to get data from request in IslandMode PUT

This commit is contained in:
Shreya Malviya 2022-08-03 13:01:19 +05:30
parent f652a489b7
commit d56951f152
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class IslandMode(AbstractResource):
@jwt_required @jwt_required
def put(self): def put(self):
try: try:
mode = IslandModeEnum(json.loads(request.data)) mode = IslandModeEnum(request.json)
self._island_mode_service.set_mode(mode) self._island_mode_service.set_mode(mode)