summaryrefslogtreecommitdiffstats
path: root/mappingtablemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mappingtablemodel.cpp')
-rw-r--r--mappingtablemodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/mappingtablemodel.cpp b/mappingtablemodel.cpp
index bcb601e..65221e4 100644
--- a/mappingtablemodel.cpp
+++ b/mappingtablemodel.cpp
@@ -163,6 +163,9 @@ bool MappingTableModel::removeItem(const QModelIndex &idx){
}
bool MappingTableModel::addMapping(int seriesPartId, int itemId){
+ if(seriesPartId == -1){
+ return false;
+ }
mDb.transaction();
mAddMappingQuery->bindValue(":id1", seriesPartId);
mAddMappingQuery->bindValue(":id2", itemId);