Cuando ruedas enteras del contador con lectura 0 el fake devolvia non… #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solucionar problemas con las lecturas fake:
Este F1 tenia una lectura y ha creado una fake, _numero_ruedas_enteras del integrador fake se ha seteado con None ya que el getter del contador con lecturas tenia como ruedas enteras 0.0 y su getter devolvia None
{'_lectura_hasta': None, '_magnitud': None, '_ajuste': None, '_periode': None, '_numero_ruedas_enteras': None, 'integrador': <Element {http://localhost/elegibilidad}Integrador at 0x7f404a776ab8>, 'comptador': None, '_lectura_desde': None}
{'_lectura_hasta': <gestionatr.input.messages.F1.Lectura object at 0x7f403a632390>, '_magnitud': 'AS', '_ajuste': None, '_periode': '10', '_numero_ruedas_enteras': 0.0, 'integrador': None, 'comptador': None, '_lectura_desde': <gestionatr.input.messages.F1.Lectura object at 0x7f403a632d50>}
entonces al ir a calcular el giro:
fake.gir_comptador
TypeError Traceback (most recent call last)
in ()
----> 1 fake.gir_comptador
/home/psala/.virtualenvs/erp/local/lib/python2.7/site-packages/gestionatr/input/messages/F1.pyc in gir_comptador(self)
989 if self.numero_ruedas_enteras == 99:
990 return 10
--> 991 return 10 ** self.numero_ruedas_enteras
992
993 @Property
TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'NoneType'