Skip to content

Commit

Permalink
Remove duplicate row before error message
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu committed Nov 24, 2023
1 parent f1bd6e1 commit 7ecc9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vorta/views/exclude_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def setData(self, index: QModelIndex, value, role: int = ...) -> bool:
self.removeRow(index.row())
return True
if role == Qt.ItemDataRole.EditRole and ExclusionModel.get_or_none(name=value, profile=self.profile):
self.removeRow(index.row())
QMessageBox.critical(
self.parent(),
'Error',
'This exclusion already exists.',
)
self.removeRow(index.row())
return False

return super().setData(index, value, role)
Expand Down

0 comments on commit 7ecc9c9

Please sign in to comment.