Skip to content

Commit

Permalink
Use ModifyColumn instead of UpdateRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyLeslie committed Jun 15, 2024
1 parent d9d5100 commit 270c7a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sandbox/grist/test_dropdown_condition_renames.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def setUp(self):
self.load_sample(testsamples.sample_students)

self.engine.apply_user_actions([useractions.from_repr(ua) for ua in (
# Column #12 is "address" in table "Schools". We add a dropdown condition formula to it.
["UpdateRecord", "_grist_Tables_column", 12, {
# Add a dropdown condition formula to Schools.address (column #12).
["ModifyColumn", "Schools", "address", {
"widgetOptions": json.dumps({
"dropdownCondition": {
"text": "'New' in choice.city and $name == rec.name",
Expand All @@ -30,7 +30,7 @@ def setUp(self):
[12, "Ref:Address", json.dumps({
"dropdownCondition": {
"text": "'New' in choice.city and $name == rec.name",
# The UpdateRecord user action should trigger an auto parse.
# The ModifyColumn user action should trigger an auto parse.
# "parsed" is stored as dumped JSON, so we need to explicitly dump it here as well.
"parsed": json.dumps(["And", ["In", ["Const", "New"], ["Attr", ["Name", "choice"], "city"]],
["Eq", ["Attr", ["Name", "rec"], "name"], ["Attr", ["Name", "rec"], "name"]]])
Expand Down

0 comments on commit 270c7a9

Please sign in to comment.