Delete and rename now working on duplicates
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
734fc13967
commit
14f1051f4d
@ -184,7 +184,20 @@ const getPhoto = function(id) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return photos[0];
|
if (!photos[0].duplicate) {
|
||||||
|
return photos[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return photoDB.sequelize.query("SELECT hash FROM photohashes WHERE photoId=:duplicate", {
|
||||||
|
replacements: photos[0],
|
||||||
|
type: photoDB.Sequelize.QueryTypes.SELECT,
|
||||||
|
raw: true
|
||||||
|
}).then(function(results) {
|
||||||
|
if (results.length != 0) {
|
||||||
|
photos[0].hash = results[0].hash;
|
||||||
|
}
|
||||||
|
return photos[0];
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user