From f30515ba9d50e4fd8eb978c48d76d95d946747e8 Mon Sep 17 00:00:00 2001 From: EstherLerouzic Date: Fri, 25 Oct 2024 13:53:10 +0200 Subject: [PATCH] fix: do not replace 0 with None Signed-off-by: EstherLerouzic Change-Id: I02ee8f4f1148873fd19f1c312578bc1f15355667 --- gnpy/core/elements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnpy/core/elements.py b/gnpy/core/elements.py index 2e0c262b..c8983c72 100644 --- a/gnpy/core/elements.py +++ b/gnpy/core/elements.py @@ -1356,7 +1356,7 @@ class Edfa(_Node): 'type': type(self).__name__, 'type_variety': self.params.type_variety, 'operational': { - 'gain_target': round(self.effective_gain, 6) if self.effective_gain else None, + 'gain_target': round(self.effective_gain, 6) if self.effective_gain is not None else None, 'delta_p': self.delta_p, 'tilt_target': round(tilt_target, 5) if tilt_target is not None else None, # defined per lambda on the amp band