- // Now we'll update the video channel's meta data to our friends
- return updateVideoChannelToFriends(json, t)
- })
- })
- .then(() => {
- logger.info('Video channel with name %s and uuid %s updated.', videoChannelInstance.name, videoChannelInstance.uuid)
- })
- .catch(err => {
- logger.debug('Cannot update the video channel.', err)
-
- // Force fields we want to update
- // If the transaction is retried, sequelize will think the object has not changed
- // So it will skip the SQL request, even if the last one was ROLLBACKed!
- Object.keys(videoChannelFieldsSave).forEach(key => {
- const value = videoChannelFieldsSave[key]
- videoChannelInstance.set(key, value)
- })
-
- throw err