Skip to content

Commit 59f56fe

Browse files
committed
Fix updating session with choices
1 parent 199f46b commit 59f56fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/euphorie/client/update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self, item):
7171
self.has_description = item.has_description
7272
self.identification = item.type == "risk" and item.identification or None
7373
self.risk_type = item.type == "risk" and item.risk_type or None
74+
self.condition = item.type == "choice" and item.condition or None
7475

7576
def __repr__(self):
7677
return "<Node zodb_path={} type={} path={}>".format(
@@ -130,7 +131,7 @@ def treeChanges(session, survey, profile=None):
130131
if entry["risk_type"] != node.risk_type:
131132
results.add((entry["zodb_path"], node.type, "modified"))
132133
if node.type == entry["type"] == "choice":
133-
if node.get_client_condition() != entry["condition"]:
134+
if node.condition != entry["condition"]:
134135
results.add((entry["zodb_path"], node.type, "modified"))
135136
if nodes[0].type == entry["type"] or (
136137
nodes[0].type == "module" and entry["type"] == "profilequestion"

0 commit comments

Comments
 (0)