Explorar el Código

fix(core): Further fix on custom field float default

Michael Bromley hace 3 años
padre
commit
b8fdbd8b31
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/core/src/entity/register-custom-entity-fields.ts

+ 1 - 1
packages/core/src/entity/register-custom-entity-fields.ts

@@ -110,7 +110,7 @@ function registerCustomFieldsForEntity(
                         // unless you specify the precision.
                         // unless you specify the precision.
                         const defaultValueDecimalPlaces = customField.defaultValue.toString().split('.')[1];
                         const defaultValueDecimalPlaces = customField.defaultValue.toString().split('.')[1];
                         if (defaultValueDecimalPlaces) {
                         if (defaultValueDecimalPlaces) {
-                            options.precision = defaultValueDecimalPlaces.length;
+                            options.scale = defaultValueDecimalPlaces.length;
                         }
                         }
                     }
                     }
                     if (
                     if (