modified ca_usage_parameters.py to make a walk around for a bug in python

This commit is contained in:
Pilar 2021-04-15 11:20:11 -04:00
parent 7b9ce04e16
commit e31fc59b8f

View File

@ -48,8 +48,9 @@ class CaUsageParameters(HftUsageInterface):
@staticmethod @staticmethod
def _assign_values(usage_zone, archetype): def _assign_values(usage_zone, archetype):
usage_zone.usage = archetype.usage usage_zone.usage = archetype.usage
# gue to the low 'tipado' of python, usage_zone.internal_gains = archetype.internal_gains assigns the wrong # Due to the fact that python is not a typed language, the wrong object type is assigned to
# object type to usage_zone.internal_gains. Therefore, this walk around has been done. # usage_zone.internal_gains when writing usage_zone.internal_gains = archetype.internal_gains.
# Therefore, this walk around has been done.
internal_gains = [] internal_gains = []
for ig in archetype.internal_gains: for ig in archetype.internal_gains:
internal_gain = InternalGains() internal_gain = InternalGains()