mirror of https://github.com/Fabio286/antares.git
fix: wrong detection of field default expressions in some cases
This commit is contained in:
parent
c568acae14
commit
04bdd085a5
|
@ -239,11 +239,11 @@ export default {
|
|||
field.defaultType = 'noval';
|
||||
else if (field.default === 'NULL')
|
||||
field.defaultType = 'null';
|
||||
else if (field.default.match(/^\s*(\w+)\s*\((.*)\)$/))
|
||||
else if (isNaN(+field.default) && field.default.charAt(0) !== '\'')
|
||||
field.defaultType = 'expression';
|
||||
else {
|
||||
field.defaultType = 'custom';
|
||||
if (isNaN(field.default) && !field.default.includes('\''))
|
||||
if (isNaN(+field.default) && !field.default.includes('\''))
|
||||
field.default = `'${field.default}'`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue