Skip to content

Commit

Permalink
Make un-confirmation more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Nov 5, 2024
1 parent 443593a commit 006bd5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aiidalab_qe/app/configuration/advanced/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _link_model(self, model: AdvancedSubModel):
(model, "override"),
)
model.observe(
self.unconfirm,
self._unconfirm,
tl.All,
)
for trait in model.dependencies:
Expand Down
7 changes: 5 additions & 2 deletions src/aiidalab_qe/common/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def confirm(self):
self.confirmed = True

@tl.observe(tl.All)
def unconfirm(self, change=None):
def _on_any_change(self, change):
if change and change["name"] != "confirmed":
self.confirmed = False
self._unconfirm()

def _unconfirm(self):
self.confirmed = False

0 comments on commit 006bd5a

Please sign in to comment.