Fix bug when gain is not initialized
If gain is not initialized, save_networks does not work properly
trying to round a None value
@@ -588,7 +588,7 @@ class Edfa(_Node):
'type': type(self).__name__,
'type_variety': self.params.type_variety,
'operational': {
- 'gain_target': round(self.effective_gain, 6),
+ 'gain_target': round(self.effective_gain, 6) if self.effective_gain else None,
'delta_p': self.delta_p,
'tilt_target': self.tilt_target,
'out_voa': self.out_voa
