Permalink
Browse files

Fix the "duplicate filename per RomVariant" check

This fixes disabling builds. For updates to existing Roms we have to
exclude self from counting the duplicates.
  • Loading branch information...
1 parent a8d2074 commit 32f18e58cfa51acdebfd0cead6598e846d0cdd29 @xdarklight committed Mar 20, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 models/rom.js
View
@@ -63,6 +63,9 @@ module.exports = function(sequelize, DataTypes) {
// Find all existing active roms for this filename with the same RomVariant.
return Rom.count({
where: {
+ id: {
+ $ne: self.id,
+ },
isActive: true,
filename: self.filename,
},

0 comments on commit 32f18e5

Please sign in to comment.