HS: Fix input_kp type for export.

setup.py
Pierre-Antoine Rouby 2024-01-29 15:43:28 +01:00
parent 1bd05ee1c2
commit bdc5e35453
2 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ class HydraulicStructure(SQLSubModel):
@input_kp.setter
def input_kp(self, input_kp):
self._input_kp = input_kp
self._input_kp = float(input_kp)
self._status.modified()
@property

View File

@ -491,7 +491,7 @@ class Mage(CommandLineSolver):
f.write(
'* ouvrage au pk ' +
f"{hs.input_kp:>12.1f}" + ' ' +
f"{float(hs.input_kp):>12.1f}" + ' ' +
hs.name + '\n'
)
@ -510,7 +510,7 @@ class Mage(CommandLineSolver):
f.write(
f"{sin_dict[bhs._type]} " +
f"{reach_id} {hs.input_kp:>12.3f} {param_str} " +
f"{reach_id} {float(hs.input_kp):>12.3f} {param_str} " +
f"{name}\n"
)