Tuesday, April 16, 2019¶
Yesterday I wanted to ask Hamza to do more changes on
move the tests about birth_date and age into a separate page
move tests about IncompleteDate to this page
remove useless tests (now that the bug is fixed)
move boring content to the end, and interesting features to the beginning.
Chooser doesn’t accept more than one argument¶
Maybe the problem is rather related to the fact that here they are keyword arguments? Or because we inject it? The following snippets indicate that everything is correct:
>>> from lino import startup >>> startup('lino_book.projects.apc.settings.doctests') >>> from lino.api.doctest import *
>>> rt.models.contacts.Partner.vat_regime_choices <bound method _chooser.<locals>.chooser_decorator.<locals>.wrapped of <class 'lino_xl.lib.contacts.models.Partner'>>
>>> rt.models.contacts.Partner.city_choices <bound method _chooser.<locals>.chooser_decorator.<locals>.wrapped of <class 'lino_xl.lib.contacts.models.Partner'>>
Hm, has the test “if ((this.contextParams[name] != value)” been introduced only recently?
Did we really not have any chooser with two context parameters?
Okay, I won’t dig deeper into this since it works, and it fixes our problem.