biviosoftware / perl-Bivio

Bivio OSS Platform
0 stars 1 forks source link

Model.do_iterate calls put_on_request incorrectly #64

Closed robnagler closed 1 year ago

robnagler commented 1 year ago

It is passing "self" which gets interpreted as a boolean durable.

schellj commented 1 year ago

The incorrect put_on_request call can certainly be fixed, but I was looking into this and it doesn't look like there is actually a deleterious effect because PropertyModel->iterate_next_and_load deletes the model from the request after the last row.

https://github.com/biviosoftware/perl-Bivio/blob/master/Biz/PropertyModel.pm#L346 https://github.com/biviosoftware/perl-Bivio/blob/master/Biz/PropertyModel.pm#L938

schellj commented 1 year ago

Actually, there could be deleterious effects because put_on_request gets called if the iterator loop ends early, iwc iterate_next_and_load doesn't get called nor does it delete the model from the request.

See #66, which adds a regression test for this and fixes the put_on_request call.