Monday, August 31, 2015

This weekend an optimization in rstgen.sphinxconf.sigal_image in order to produce

Worked on #469. New module lino_noi.projects.bs3. The first session revealed a subtle bug: actors with an empty set as required_roles were not visible to anonymous users because actions also required SiteUser.

The murder bug

We finally managed to reproduce and understand what we internally called the murder bug. This bug had caused several cases of sudden data loss, hundreds of persons vanishing “overnight”. Continued from 20150824 (Monday, 24 August 2015) for the hopefully last time.

The situation where Lino’s lino.core.ddh failed to throw a veto was the following: when deleting an MTI child, Lino did not ask vetos from its MTI parents. For example when deleting a person who is being used as the partner of a user, then Lino ran only the DDH for the Person, not those for the Partner.

And since we now had a reproducible case, I discovered and fixed another bug: that new loop in kernel_startup (which sets on_delete to PROTECT for the FK fields which are not listed in their model’s allow_cascaded_delete) did not work due to a simple typo bug (== instead of =).

Added three test cases and a diagnostic utility:

Yes, #477 was the murder bug, and #452 was probably even innocent.

Checkin. Release in Eupen. Last optimizations on #363.

One day I should write more about how Lino manages to make deleting more secure. I stumbled over Stefan Haflidason’s article Safer (Soft) Deletion in Django how complex things are.

Another thing to do is to check whether django-reversion <> would be a replacement for lino.modlib.changes.