Skip to content

Commit 2917cf3

Browse files
committed
🚧 [#5139] Replace DataContainer with FormioData instance in get_dynamic_configuration
1 parent 6050a45 commit 2917cf3

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/openforms/formio/dynamic_config/date.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def calculate_delta(
114114
) -> datetime | None:
115115
assert config["mode"] == "relativeToVariable"
116116

117-
base_value = glom(data, config["variable"], default=None)
117+
base_value = data.get(config["variable"])
118118
if not base_value:
119119
return
120120

src/openforms/submissions/form_logic.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,9 @@ def evaluate_form_logic(
132132
# TODO: refactor this to rely on variables state
133133
config_wrapper = get_dynamic_configuration(
134134
config_wrapper,
135-
# context is expected to contain request, as it's the default behaviour with
136-
# DRF view(set)s and serializers.
137-
# TODO: check if we can use context["request"] rather than .get - None is not
138-
# expected, but that currently breaks a lot of tests...
139-
request=context.get("request"),
135+
request=None,
140136
submission=submission,
141-
data=data_container.data,
137+
data=data_for_evaluation,
142138
)
143139

144140
# 7.1 Apply the component mutation operations

0 commit comments

Comments
 (0)