Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
Fix the "duplicate filename per RomVariant" check
Browse files Browse the repository at this point in the history
This fixes disabling builds. For updates to existing Roms we have to
exclude self from counting the duplicates.
  • Loading branch information
xdarklight committed Mar 20, 2016
1 parent a8d2074 commit 32f18e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/rom.js
Expand Up @@ -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,
},
Expand Down

0 comments on commit 32f18e5

Please sign in to comment.