20150915 (Tuesday, 15 September 2015)

I stumbled over #523 and investigated the reason. We must probably just add param_values to the inheritable attributes to be copied to the other request (in setup_from). I will not fix it now since Hamza is working on #520. But I can write a test case to reproduce it.

Ticket #159

Steve managed to reproduce #159 (‘NoneType’ object is not iterable (after duplicating a budget)). It turns out that the symptom of this problem was the same as that of #471 (Become the author after duplicating a budget): after duplicating a budget, the author of the new budget should be the user who asked to duplicate it, not the original author.

I extended test_debts to reproduce also this problem.

A first subtle consequence for the framework: Changed the exception handling during TableRequest.execute. When an exception occurs during get_data_iterator(), then we want it to be reported only once. This remains. But until now it was reported as a direct call to logger.exception(). Now it is being forwarded (re-risen). Because the old behaviour was hiding the real location, a reason why #159 had been so hard to find.

A second subtle consequence: the known_values attribute of a TableRequest had a default value None, overriding the default value {} already defined in lino.core.requests.BaseRequest. I guess that this was not intended.

I also added some explanations in the docstring of lino.core.model.Model.on_duplicate().

Ticket #523

Since anyway I did some changes to Lino today (and since I hope that there won’t be any conflicts), I then fixed #523. Most time went (as usual) into writing a test case (in working : Work time tracking). The actual bug was in lino.core.requests.BaseRequest.set_selected_pks(). En passant I also fixed the test suite (changes in tickets (Ticket management in Noi)).