mirror of
https://github.com/strapi/strapi.git
synced 2025-12-05 11:32:13 +00:00
Fix multi image upload deleting old links
This commit is contained in:
parent
836920b4f8
commit
2d65ebeade
@ -270,9 +270,11 @@ module.exports = {
|
||||
: null
|
||||
);
|
||||
|
||||
const reverseAssoc = model.associations.find(assoc => assoc.alias === obj.field);
|
||||
|
||||
// Remove existing relationship because only one file
|
||||
// can be related to this field.
|
||||
if (association.nature === 'manyMorphToOne') {
|
||||
if (reverseAssoc && reverseAssoc.nature === 'oneToManyMorph') {
|
||||
relationUpdates.push(
|
||||
module.exports.removeRelationMorph
|
||||
.call(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user