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 @@ -2373,11 +2373,13 @@ def import_path(self, path, id_mapping):
Import Local Baserow signal service types paths.
"""

# All Local Baserow signal service types have a length of 3:
# {previousNodeId}.{rowIndex}.{fieldName}. By this point, we should
# only have two parts: {rowIndex}.{fieldName}.
if len(path) == 2:
index, field_dbname = path
# If we receive:
# {previousNodeId}.{rowIndex}.{fieldName}, or
# {previousNodeId}.{rowIndex}.{fieldName}.{fieldValueIndex}.{value}
# (e.g. a `link_row`)
# then pluck out the row index / field name and use it.
if len(path) >= 2:
index, field_dbname, *rest = path
else:
# In any other scenario, we have a formula that is not a format we
# can currently import properly, so we return the path as is.
Expand All @@ -2392,7 +2394,7 @@ def import_path(self, path, id_mapping):
self.import_property_name(field_dbname, id_mapping) or field_dbname
)

return [index, imported_field_dbname]
return [index, imported_field_dbname, *rest]


class LocalBaserowRowsCreatedServiceType(LocalBaserowRowsSignalServiceType):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import pytest

from baserow.contrib.integrations.local_baserow.service_types import (
LocalBaserowRowsCreatedServiceType,
)


@pytest.mark.parametrize(
"path,id_mapping,expected",
[
# When path has fewer than 2 elements, return as is
([], {}, []),
(["0"], {}, ["0"]),
# When field_dbname doesn't start with "field_", return path as is
(["0", "id"], {}, ["0", "id"]),
(["0", "foo"], {}, ["0", "foo"]),
# {rowIndex}.{fieldName} and field not in mapping
(["0", "field_1"], {}, ["0", "field_1"]),
# {rowIndex}.{fieldName} and field in mapping
(["0", "field_1"], {"database_fields": {1: 2}}, ["0", "field_2"]),
# {rowIndex}.{fieldName}.{fieldValueIndex}.{value} and field not in mapping
(["0", "field_1", "0", "value"], {}, ["0", "field_1", "0", "value"]),
# {rowIndex}.{fieldName}.{fieldValueIndex}.{value} and field in mapping
(
["0", "field_1", "0", "value"],
{"database_fields": {1: 2}},
["0", "field_2", "0", "value"],
),
],
)
def test_local_baserow_rows_signal_service_type_import_path(path, id_mapping, expected):
assert (
LocalBaserowRowsCreatedServiceType().import_path(path, id_mapping) == expected
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "bug",
"message": "Resolved a bug which prevented certain Baserow field types from being used after a row-change trigger.",
"issue_origin": "github",
"issue_number": null,
"domain": "automation",
"bullet_points": [],
"created_at": "2026-03-20"
}
Loading