Skip to content

Commit

Permalink
Minor warning tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Sep 14, 2023
1 parent e1c5bbd commit b8f3943
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bidscoin/bidseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,9 @@ def bidscell2run(self, rowindex: int, colindex: int):
if isinstance(value, str) and ('<<' not in value or '>>' not in value):
value = bids.cleanup_value(self.datasource.dynamicvalue(value))
self.bids_table.item(rowindex, 1).setText(value)
if key == 'run' and value and '<<' in oldvalue and '>>' in oldvalue:
if key == 'run' and value and '<<' in oldvalue and '>>' in oldvalue and not ('<<' in value and '>>' in value):
answer = QMessageBox.question(self, f"Edit bids entities",
f'It is discouraged to change the <<dynamic>> run-index unless you are an expert user. Do you really want to change "{oldvalue}" to "{value}"?',
f'It is discouraged to remove the <<dynamic>> run-index. Do you really want to change "{oldvalue}" to "{value}"?',
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, QMessageBox.StandardButton.No)
if answer == QMessageBox.StandardButton.Yes:
LOGGER.warning(f"Expert usage: User has set bids['{key}'] from '{oldvalue}' to '{value}' for {self.target_run['provenance']}")
Expand Down

0 comments on commit b8f3943

Please sign in to comment.