mirror of
https://github.com/strapi/strapi.git
synced 2025-09-01 04:42:58 +00:00
fix bug
(const variable is assigned it cannot be assigned again and an attempt to do so will throw an error)
This commit is contained in:
parent
267c4e1675
commit
c5bb2da0a4
@ -457,7 +457,7 @@ module.exports = function(strapi) {
|
|||||||
result.value = parseFloat(value);
|
result.value = parseFloat(value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
result = undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -622,7 +622,7 @@ module.exports = function(strapi) {
|
|||||||
switch (association.nature) {
|
switch (association.nature) {
|
||||||
case 'oneToOne':
|
case 'oneToOne':
|
||||||
case 'oneToMany':
|
case 'oneToMany':
|
||||||
return this.manageRelations(model, params)
|
return this.manageRelations(model, params);
|
||||||
case 'manyToMany':
|
case 'manyToMany':
|
||||||
return Model.forge({
|
return Model.forge({
|
||||||
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
|
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
|
||||||
@ -645,7 +645,7 @@ module.exports = function(strapi) {
|
|||||||
switch (association.nature) {
|
switch (association.nature) {
|
||||||
case 'oneToOne':
|
case 'oneToOne':
|
||||||
case 'oneToMany':
|
case 'oneToMany':
|
||||||
return this.manageRelations(model, params)
|
return this.manageRelations(model, params);
|
||||||
case 'manyToMany':
|
case 'manyToMany':
|
||||||
return Model.forge({
|
return Model.forge({
|
||||||
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
|
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user