Skip to content

Commit 5031601

Browse files
committed
mitosheet: fix bug with default editing mode on non-pro
1 parent 7a260a7 commit 5031601

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

mitosheet/mitosheet/mito_backend.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def __init__(
9494

9595
if not os.path.exists(import_folder):
9696
raise ValueError(f"Import folder {import_folder} does not exist. Please change the file path or create the folder.")
97-
98-
default_apply_formula_to_column = False if default_editing_mode == 'cell' else True
99-
97+
10098
# Set up the state container to hold private widget state
10199
self.steps_manager = StepsManager(
102100
args,
@@ -110,7 +108,7 @@ def __init__(
110108
code_options=code_options,
111109
column_definitions=column_definitions,
112110
theme=theme,
113-
default_apply_formula_to_column=default_apply_formula_to_column
111+
default_editing_mode=default_editing_mode
114112
)
115113

116114
# And the api

mitosheet/mitosheet/steps_manager.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
SnowflakeImportStepPerformer
3636
from mitosheet.transpiler.transpile import transpile
3737
from mitosheet.transpiler.transpile_utils import get_default_code_options
38-
from mitosheet.types import CodeOptions, ColumnDefinintion, ColumnDefinitions, MitoTheme, ParamMetadata
38+
from mitosheet.types import CodeOptions, ColumnDefinintion, ColumnDefinitions, DefaultEditingMode, MitoTheme, ParamMetadata
3939
from mitosheet.updates import UPDATES
4040
from mitosheet.user.utils import is_enterprise, is_pro, is_running_test
4141
from mitosheet.utils import NpEncoder, dfs_to_array_for_json, get_default_df_formats, get_new_id, is_default_df_names
@@ -188,7 +188,7 @@ def __init__(
188188
user_defined_editors: Optional[List[Callable]]=None,
189189
code_options: Optional[CodeOptions]=None,
190190
column_definitions: Optional[List[ColumnDefinitions]]=None,
191-
default_apply_formula_to_column: Optional[bool]=None,
191+
default_editing_mode: Optional[DefaultEditingMode]=None,
192192
theme: Optional[MitoTheme]=None,
193193
):
194194
"""
@@ -256,7 +256,8 @@ def __init__(
256256

257257
if not is_running_test() and not is_pro() and column_definitions is not None:
258258
raise ValueError("column definitions are only supported in the enterprise version of Mito. See Mito plans https://www.trymito.io/plans")
259-
259+
260+
default_apply_formula_to_column = False if default_editing_mode == 'cell' else True
260261
if not is_running_test() and not is_pro() and default_apply_formula_to_column is not None:
261262
raise ValueError(f'Setting default_editing_mode is only supported in the enterprise version of Mito. See Mito plans https://www.trymito.io/plans')
262263

0 commit comments

Comments
 (0)