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 8d4fbe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vorta/store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""

import json
import logging
from datetime import datetime
from enum import Enum
import logging

import peewee as pw
from playhouse import signals
Expand Down
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 8d4fbe1

Please sign in to comment.