16470: Fixes false unpersisted status when retrieving a record with audit logs.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 28 Jul 2020 19:16:29 +0000 (16:16 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Tue, 28 Jul 2020 19:16:29 +0000 (16:16 -0300)
The cleanest solution I came up with is to flag the instance when it's
retrieved from the database, and reset any changes after stashing its
state on the log_start_state callback.
Haven't found a way to read the serialized attributes without making
them appear as changed, and I think it isn't possible because the
attributes have to be unserialized before the read operation, and thus
the dirty state machinery would assume the attribute may be modified.
This solution isn't ideal, but I think it's acceptable as it doesn't
make additional database requests.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>


No differences found