mirror of
https://github.com/Fabio286/antares.git
synced 2024-12-25 08:20:39 +01:00
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
Block a user