Fix PR feedback - handle type float

This commit is contained in:
Jim Laurie 2018-04-26 13:47:40 +02:00
parent 611dfb32eb
commit 1ee8d9b30a
2 changed files with 5 additions and 21 deletions

View File

@ -322,7 +322,7 @@ module.exports = function(strapi) {
let type;
if (!attribute.type) {
// Add interger value is if relation
// Add integer value if there is a relation
const relation = definition.associations.find((association) => {
return association.alias === attr;
});
@ -346,9 +346,11 @@ module.exports = function(strapi) {
break;
case 'integer':
case 'biginteger':
type = definition.client === 'pg' ? 'integer' : 'int';
break;
case 'float':
case 'decimal':
type = definition.client === 'pg' ? 'integer' : 'int';
type = attribute.type;
break;
case 'date':
case 'time':

View File

@ -1,19 +1 @@
{
"article": {
"attributes": {
"title": {
"appearance": ""
},
"content": {
"appearance": ""
}
}
},
"account": {
"attributes": {
"name": {
"appearance": ""
}
}
}
}
{}