mirror of
https://github.com/strapi/strapi.git
synced 2025-09-09 16:47:06 +00:00
Handle bookshelf fix #1490
This commit is contained in:
parent
cfda76aec9
commit
bb38f2a42c
@ -97,7 +97,7 @@ module.exports = {
|
||||
module.exports.findOne
|
||||
.call(model, { [model.primaryKey]: recordId }, [details.via])
|
||||
.then(record => {
|
||||
if (record && _.isObject(record[details.via])) {
|
||||
if (record && _.isObject(record[details.via]) && record.id !== record[details.via][current]) {
|
||||
return module.exports.update.call(this, {
|
||||
id: getValuePrimaryKey(record[details.via], model.primaryKey),
|
||||
values: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user