diff --git a/sandbox/grist/dropdown_condition.py b/sandbox/grist/dropdown_condition.py index c590db71..409486c3 100644 --- a/sandbox/grist/dropdown_condition.py +++ b/sandbox/grist/dropdown_condition.py @@ -35,7 +35,7 @@ def perform_dropdown_condition_renames(useractions, renames): try: widget_options = json.loads(col.widgetOptions) dc_formula = widget_options["dropdownCondition"]["text"] - except (json.JSONDecodeError, KeyError): + except (ValueError, KeyError): continue # Find out what table this column refers to and belongs to. diff --git a/sandbox/grist/useractions.py b/sandbox/grist/useractions.py index 3c01b996..19bfc1c0 100644 --- a/sandbox/grist/useractions.py +++ b/sandbox/grist/useractions.py @@ -708,9 +708,6 @@ class UserActions(object): for col_rec, new_formula in sorted(six.iteritems(formula_updates)): col_updates.setdefault(col_rec, {}).setdefault('formula', new_formula) - acl.perform_acl_rule_renames(self, renames) - dropdown_condition.perform_dropdown_condition_renames(self, renames) - update_pairs = col_updates.items() # Disallow most changes to summary group-by columns, except to match the underlying column. @@ -752,6 +749,10 @@ class UserActions(object): self.doBulkUpdateFromPairs(table_id, update_pairs) + if renames: + acl.perform_acl_rule_renames(self, renames) + dropdown_condition.perform_dropdown_condition_renames(self, renames) + for table_id in rebuild_summary_tables: table = self._engine.tables[table_id] self._engine._update_table_model(table, table.user_table)