Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from django.db import transaction
from django.db.models import QuerySet
from django.dispatch import Signal
from django.utils.translation import gettext as _

from rest_framework import serializers
from rest_framework.exceptions import ValidationError as DRFValidationError
Expand Down Expand Up @@ -1656,6 +1657,7 @@ def dispatch_data(
:param resolved_values: If the service has any formulas, this dictionary will
contain their resolved values.
:param dispatch_context: The context used for the dispatch.
:raises ServiceImproperlyConfiguredDispatchException: When no rows are found.
:return: The rows.
"""

Expand All @@ -1671,7 +1673,7 @@ def dispatch_data(
# row by setting the right condition
if "row_id" not in resolved_values:
if not queryset.exists():
raise DoesNotExist()
raise ServiceImproperlyConfiguredDispatchException(_("No rows found"))
return {
"data": queryset.first(),
"baserow_table_model": table_model,
Expand All @@ -1686,7 +1688,9 @@ def dispatch_data(
"public_allowed_properties": only_field_names,
}
except table_model.DoesNotExist:
raise DoesNotExist()
raise ServiceImproperlyConfiguredDispatchException(
_(f"Row {resolved_values['row_id']} does not exist.")
)

def dispatch_transform(self, dispatch_data: Dict[str, Any]) -> DispatchResult:
"""
Expand Down
18 changes: 13 additions & 5 deletions backend/src/baserow/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-17 15:17+0000\n"
"POT-Creation-Date: 2026-01-09 16:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -35,15 +35,15 @@ msgstr ""
#: src/baserow/contrib/automation/action_scopes.py:14
#, python-format
msgid ""
"of type (%(node_type)s) in automation \"%(automation_name)s\" "
"(%(automation_id)s)."
"of type (%(node_type)s) in automation "
"\"%(automation_name)s\" (%(automation_id)s)."
msgstr ""

#: src/baserow/contrib/automation/actions.py:8
#, python-format
msgid ""
"in workflow (%(workflow_id)s) in automation \"%(automation_name)s\" "
"(%(automation_id)s)."
"in workflow (%(workflow_id)s) in automation "
"\"%(automation_name)s\" (%(automation_id)s)."
msgstr ""

#: src/baserow/contrib/automation/automation_init_application.py:29
Expand Down Expand Up @@ -221,6 +221,14 @@ msgstr ""
msgid "Triggered at"
msgstr ""

#: src/baserow/contrib/integrations/local_baserow/service_types.py:1676
msgid "No rows found"
msgstr ""

#: src/baserow/contrib/integrations/local_baserow/service_types.py:1692
msgid "Row {resolved_values['row_id']} does not exist."
msgstr ""

#: src/baserow/contrib/integrations/slack/service_types.py:166
msgid "OK"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
)
from baserow.core.exceptions import PermissionException
from baserow.core.services.exceptions import (
DoesNotExist,
InvalidContextContentDispatchException,
ServiceImproperlyConfiguredDispatchException,
)
Expand Down Expand Up @@ -257,7 +256,7 @@ def test_local_baserow_get_row_service_dispatch_data_with_view_filter(data_fixtu
dispatch_context = FakeDispatchContext()

dispatch_values = service_type.resolve_service_formulas(service, dispatch_context)
with pytest.raises(DoesNotExist):
with pytest.raises(ServiceImproperlyConfiguredDispatchException):
service_type.dispatch_data(service, dispatch_values, dispatch_context)


Expand Down Expand Up @@ -291,7 +290,7 @@ def test_local_baserow_get_row_service_dispatch_data_with_service_search(
dispatch_context = FakeDispatchContext()

dispatch_values = service_type.resolve_service_formulas(service, dispatch_context)
with pytest.raises(DoesNotExist):
with pytest.raises(ServiceImproperlyConfiguredDispatchException):
service_type.dispatch_data(service, dispatch_values, dispatch_context)


Expand Down Expand Up @@ -422,7 +421,7 @@ def test_local_baserow_get_row_service_dispatch_data_row_not_exist(data_fixture)

dispatch_context = FakeDispatchContext()
dispatch_values = service_type.resolve_service_formulas(service, dispatch_context)
with pytest.raises(DoesNotExist):
with pytest.raises(ServiceImproperlyConfiguredDispatchException):
service_type.dispatch_data(service, dispatch_values, dispatch_context)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "bug",
"message": "Improved error handling in the Local Baserow single table row action.",
"issue_origin": "github",
"issue_number": null,
"domain": "integration",
"bullet_points": [],
"created_at": "2026-01-09"
}
Loading