diff --git a/src/aaz_dev/command/model/configuration/_arg.py b/src/aaz_dev/command/model/configuration/_arg.py index f609ad39..8f339e3d 100644 --- a/src/aaz_dev/command/model/configuration/_arg.py +++ b/src/aaz_dev/command/model/configuration/_arg.py @@ -614,8 +614,12 @@ def _reformat_base(self, **kwargs): self.enum.reformat(**kwargs) if self.blank: if not isinstance(self.blank.value, float) and not (self.nullable and self.blank.value is None): - raise exceptions.VerificationError( - f"Invalid blank value", details=f"'{self.blank.value}' is not a valid float arg value") + if isinstance(self.blank.value, int): + # frontend will pass an int value when it doesn't have decimal part + self.blank.value = float(self.blank.value) + else: + raise exceptions.VerificationError( + f"Invalid blank value", details=f"'{self.blank.value}' is not a valid float arg value") class CMDFloatArg(CMDFloatArgBase, CMDArg): @@ -624,8 +628,12 @@ def _reformat(self, **kwargs): super()._reformat(**kwargs) if self.default: if not isinstance(self.default.value, float) and not (self.nullable and self.default.value is None): - raise exceptions.VerificationError( - f"Invalid default value", details=f"'{self.default.value}' is not a valid float arg value") + if isinstance(self.default.value, int): + # frontend will pass an int value when it doesn't have decimal part + self.default.value = float(self.default.value) + else: + raise exceptions.VerificationError( + f"Invalid default value", details=f"'{self.default.value}' is not a valid float arg value") # float32