From 95fb63f02772f319f245e95ff45eddeffbc60a71 Mon Sep 17 00:00:00 2001 From: Tsering Paljor Date: Tue, 17 Mar 2026 08:47:27 +0700 Subject: [PATCH 1/2] Fix a hard-crash when querying custom code endpoint with invalid builder ID. (#4964) --- ..._querying_custom_code_endpoint_with_an_inv.json | 9 +++++++++ .../api/builder/custom_code/views.py | 12 ++++++++---- .../test_enterprise_application_views.py | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 changelog/entries/unreleased/bug/fixed_a_crash_when_querying_custom_code_endpoint_with_an_inv.json diff --git a/changelog/entries/unreleased/bug/fixed_a_crash_when_querying_custom_code_endpoint_with_an_inv.json b/changelog/entries/unreleased/bug/fixed_a_crash_when_querying_custom_code_endpoint_with_an_inv.json new file mode 100644 index 0000000000..322a9c24b8 --- /dev/null +++ b/changelog/entries/unreleased/bug/fixed_a_crash_when_querying_custom_code_endpoint_with_an_inv.json @@ -0,0 +1,9 @@ +{ + "type": "bug", + "message": "Fixed a crash when fetching custom code for a non-existent builder ID.", + "issue_origin": "github", + "issue_number": null, + "domain": "builder", + "bullet_points": [], + "created_at": "2026-03-12" +} diff --git a/enterprise/backend/src/baserow_enterprise/api/builder/custom_code/views.py b/enterprise/backend/src/baserow_enterprise/api/builder/custom_code/views.py index fcabc1dcd8..528506d338 100644 --- a/enterprise/backend/src/baserow_enterprise/api/builder/custom_code/views.py +++ b/enterprise/backend/src/baserow_enterprise/api/builder/custom_code/views.py @@ -5,11 +5,11 @@ from rest_framework.permissions import AllowAny from rest_framework.views import APIView +from baserow.api.applications.errors import ERROR_APPLICATION_DOES_NOT_EXIST from baserow.api.decorators import map_exceptions from baserow.api.schemas import get_error_schema -from baserow.contrib.builder.errors import ERROR_BUILDER_DOES_NOT_EXIST -from baserow.contrib.builder.exceptions import BuilderDoesNotExist from baserow.contrib.builder.service import BuilderService +from baserow.core.exceptions import ApplicationDoesNotExist from baserow_enterprise.api.authentication import ( AuthenticateFromUserSessionAuthentication, ) @@ -46,12 +46,16 @@ class PublicCustomCodeView(APIView): description=("Returns the css/js for the given builder."), responses={ 200: str, - 404: get_error_schema(["ERROR_BUILDER_DOES_NOT_EXIST"]), + 404: get_error_schema( + [ + "ERROR_APPLICATION_DOES_NOT_EXIST", + ] + ), }, ) @map_exceptions( { - BuilderDoesNotExist: ERROR_BUILDER_DOES_NOT_EXIST, + ApplicationDoesNotExist: ERROR_APPLICATION_DOES_NOT_EXIST, } ) def get(self, request, builder_id, code_type): diff --git a/enterprise/backend/tests/baserow_enterprise_tests/builder/custom_code/test_enterprise_application_views.py b/enterprise/backend/tests/baserow_enterprise_tests/builder/custom_code/test_enterprise_application_views.py index 7df13dccd1..3c42bd0775 100644 --- a/enterprise/backend/tests/baserow_enterprise_tests/builder/custom_code/test_enterprise_application_views.py +++ b/enterprise/backend/tests/baserow_enterprise_tests/builder/custom_code/test_enterprise_application_views.py @@ -263,3 +263,17 @@ def test_get_enterprise_builder_custom_code_public_no_licence(api_client, data_f url, ) assert response.status_code == HTTP_404_NOT_FOUND + + +@pytest.mark.django_db +def test_get_enterprise_builder_custom_code_public_application_not_found( + enable_enterprise, api_client, data_fixture +): + url = reverse( + "api:enterprise:custom_code:public_js", + kwargs={"builder_id": 123456}, + ) + + response = api_client.get(url) + + assert response.status_code == HTTP_404_NOT_FOUND From 297e2fc3b510cc8fc6b7b4d6aa3aee17cfa587c8 Mon Sep 17 00:00:00 2001 From: Tsering Paljor Date: Tue, 17 Mar 2026 08:48:17 +0700 Subject: [PATCH 2/2] Ensure opening the Automation's settings modal doesn't replace the automation values. (#4984) --- ...that_caused_a_crash_when_trying_to_view_an_autom.json | 9 +++++++++ .../automation/components/settings/GeneralSettings.vue | 1 + 2 files changed, 10 insertions(+) create mode 100644 changelog/entries/unreleased/bug/fixed_a_bug_that_caused_a_crash_when_trying_to_view_an_autom.json diff --git a/changelog/entries/unreleased/bug/fixed_a_bug_that_caused_a_crash_when_trying_to_view_an_autom.json b/changelog/entries/unreleased/bug/fixed_a_bug_that_caused_a_crash_when_trying_to_view_an_autom.json new file mode 100644 index 0000000000..23e109dd8e --- /dev/null +++ b/changelog/entries/unreleased/bug/fixed_a_bug_that_caused_a_crash_when_trying_to_view_an_autom.json @@ -0,0 +1,9 @@ +{ + "type": "bug", + "message": "Fixed a bug that caused a crash when trying to view an Automation's settings in development mode.", + "issue_origin": "github", + "issue_number": null, + "domain": "automation", + "bullet_points": [], + "created_at": "2026-03-16" +} diff --git a/web-frontend/modules/automation/components/settings/GeneralSettings.vue b/web-frontend/modules/automation/components/settings/GeneralSettings.vue index b1cce56af3..6ed92ca088 100644 --- a/web-frontend/modules/automation/components/settings/GeneralSettings.vue +++ b/web-frontend/modules/automation/components/settings/GeneralSettings.vue @@ -59,6 +59,7 @@ export default { name: '', notification: false, }, + allowedValues: ['name', 'notification'], } }, validations() {