https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28700

--- Comment #15 from Martin Renvoize <[email protected]> ---
I think we are perhaps trying to solve two problems here when we should be
doing different things in different situations.

I don't think we should implicitly call get_from_storage/discard_changes inside
the unblessed method as it has knock-on effects for the object.  For cases
where we want the stored object back, including any DB level trigger updates, I
think we should call that specifically as suggested by Tomas. So where we're
giving API responses, or just prior to calling logaction in many cases.

I do however, think wherever possible 'unblessed' should indeed return a
stringified value and not an object.

I think Peters solution is nearly there.. but instead of handling datetimes
specifically and throwing errors otherwise, I'd just stringify all values and
thus catch whatever we can.

Thus, my proposal would be

for my $k (keys %res) {
  $res{$k} = "$res{$k}";
}

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to