From f95f2e2f4edc5937f00fdeda32a72935b942cae0 Mon Sep 17 00:00:00 2001 From: Abdelrahman Deghedy Date: Tue, 23 Jan 2024 09:51:15 +0000 Subject: [PATCH 1/2] fix: 1573-Fix Saving Feature (#1574) * Fix saving feature * Remove extra whitespace * Merge branch 'master' into 1573-fix-saving-feature --- game/static/game/js/game.js | 4 ++-- game/views/level.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/game/static/game/js/game.js b/game/static/game/js/game.js index 1d12d4205..3ef18a762 100644 --- a/game/static/game/js/game.js +++ b/game/static/game/js/game.js @@ -1211,13 +1211,13 @@ ocargo.Game.prototype._setupSaveTab = function () { break } } - var workspace = { name: newName, contents: ocargo.blocklyControl.serialize(), python_contents: ocargo.pythonControl.getCode(), blockly_enabled: BLOCKLY_ENABLED, - python_enabled: PYTHON_ENABLED + python_enabled: PYTHON_ENABLED, + pythonViewEnabled: PYTHON_VIEW_ENABLED } this.saving.saveWorkspace( diff --git a/game/views/level.py b/game/views/level.py index 865edc7b2..a4511b002 100644 --- a/game/views/level.py +++ b/game/views/level.py @@ -360,6 +360,10 @@ def load_workspace(request, workspaceID): def save_workspace(request, workspaceID=None): + request_params = ["name", "contents", "python_contents", "blockly_enabled", "python_enabled", "pythonViewEnabled"] + missing_params = [param for param in request_params if param not in request.POST] + if missing_params != []: + raise Exception("Request missing the following required parameters", missing_params) name = request.POST.get("name") contents = request.POST.get("contents") python_contents = request.POST.get("python_contents") From bc5ef3fe321a56f39e6ece55158708feb1211a47 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 23 Jan 2024 09:52:59 +0000 Subject: [PATCH 2/2] 5.16.12 Automatically generated by python-semantic-release --- CHANGELOG.md | 6 ++++++ game/__init__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c34fa49b9..33d90eedb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ +## v5.16.12 (2024-01-23) + +### Fix + +* 1573-Fix Saving Feature ([#1574](https://github.com/ocadotechnology/rapid-router/issues/1574)) ([`f95f2e2`](https://github.com/ocadotechnology/rapid-router/commit/f95f2e2f4edc5937f00fdeda32a72935b942cae0)) + ## v5.16.11 (2024-01-22) ### Fix diff --git a/game/__init__.py b/game/__init__.py index 7c703fa8d..c691c3bed 100644 --- a/game/__init__.py +++ b/game/__init__.py @@ -1 +1 @@ -__version__ = "5.16.11" +__version__ = "5.16.12"