|
From: John R. <ro...@ie...> - 2026-10-05 14:08:40
|
Hi Ralf:
On Mon, Oct 5, 2026 at 3:55 AM Ralf Schlatterbeck <rs...@ru...> wrote:
> On Sun, Oct 04, 2026 at 10:39:25PM -0400, John Rouillard via Roundup-users wrote:
> [Documented behavior of which properties are in oldvalues differs from
> what is documented]
>
> Yes, I noticed that a long time ago but didn't look into what is
> documented. A lot of my code has additional checks if the current value
> is the same/differs from the one in oldvalues. But I do not think fixing
> this will break anything, so I guess it's a good idea to finally fix it,
> thanks for taking the time to take a detailed look!
You said you have checks to see if oldvalue and newvalue are different.
Is each of your oldvalue checks guarded to make sure the property you are
comparing exists in oldvalues?
For example:
"some_unchanged_prop" in oldvalues and oldvalues['some_unchanged_prop']
is ok but a bare:
oldvalues['some_unchanged_prop']
will fail if I strip unchanged properties.
Currently the second case is fine and returns the same value as a
database lookup.
-- rouilj
|