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/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 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() {