Skip to content

Commit

Permalink
Merge pull request #712 from euphorie/scrum-2030-always-present
Browse files Browse the repository at this point in the history
Use always_present_default in treeChanges.
  • Loading branch information
reinhardt committed Mar 7, 2024
2 parents d99c2db + 8d10ad9 commit 2f5b692
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
16.1.1 (unreleased)
-------------------

- Nothing changed yet.
- Fix change detection when tool has been updated
Ref: scrum-2030


16.1.0 (2024-03-05)
Expand Down
6 changes: 5 additions & 1 deletion src/euphorie/client/update.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from euphorie.client import model
from euphorie.client.profile import always_present_default
from euphorie.client.utils import HasText
from euphorie.content.interfaces import IQuestionContainer
from z3c.saconfig import Session
Expand Down Expand Up @@ -117,7 +118,10 @@ def treeChanges(session, survey, profile=None):
# skipped.
results.add((entry["zodb_path"], nodes[0].type, "modified"))
if node.type == entry["type"] == "risk":
if entry["always_present"] and node.identification != "no":
if (
entry["always_present"]
and node.identification != always_present_default
):
results.add((entry["zodb_path"], node.type, "modified"))
if entry["risk_type"] != node.risk_type:
results.add((entry["zodb_path"], node.type, "modified"))
Expand Down

0 comments on commit 2f5b692

Please sign in to comment.