removed cascading delete from models and added logs
This commit is contained in:
parent
7886a07182
commit
43d8402643
5 changed files with 2 additions and 3 deletions
|
@ -79,6 +79,7 @@ module.exports = {
|
|||
resolve(publishResults); // resolve the promise with the result from lbryApi.publishClaim;
|
||||
})
|
||||
.catch(error => {
|
||||
logger.error('PUBLISH ERROR', error);
|
||||
publishHelpers.deleteTemporaryFile(publishParams.file_path); // delete the local file
|
||||
reject(error);
|
||||
});
|
||||
|
|
|
@ -93,7 +93,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
|
|||
|
||||
Certificate.associate = db => {
|
||||
Certificate.belongsTo(db.Channel, {
|
||||
onDelete : 'cascade',
|
||||
foreignKey: {
|
||||
allowNull: true,
|
||||
},
|
||||
|
|
|
@ -234,7 +234,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
|
|||
|
||||
Claim.associate = db => {
|
||||
Claim.belongsTo(db.File, {
|
||||
onDelete : 'cascade',
|
||||
foreignKey: {
|
||||
allowNull: true,
|
||||
},
|
||||
|
|
|
@ -27,7 +27,6 @@ module.exports = (sequelize, { STRING, BOOLEAN, TEXT }) => {
|
|||
|
||||
Request.associate = db => {
|
||||
Request.belongsTo(db.File, {
|
||||
onDelete : 'cascade',
|
||||
foreignKey: {
|
||||
allowNull: true,
|
||||
},
|
||||
|
|
|
@ -134,6 +134,7 @@ module.exports = (app) => {
|
|||
res.status(400).json({success: false, message: error.message});
|
||||
return;
|
||||
}
|
||||
logger.debug('publish req.files:', files);
|
||||
// validate file, name, license, and nsfw
|
||||
file = files.file;
|
||||
fileName = file.path.substring(file.path.lastIndexOf('/') + 1);
|
||||
|
|
Loading…
Reference in a new issue