Skip to content
Discussion options

You must be logged in to vote

I tested it and that's what I found:

session.dirty behaves a bit strange, but it seems that it's not related to inheritance.
If you try mutating only one of good_track or bad_track it will work well (object will be in session.dirty as expected).
But after you mutate second object, first one is not in session.dirty anymore... But second object is IN session.dirty.

good_track.custom["test"] = "changed first time"
assert good_track in session.dirty  # good_track is in dirty

bad_track.custom["test"] = "changed first time"
assert bad_track in session.dirty  # bad_track is in dirty

assert good_track not in session.dirty  # good_track is NOT in dirty anymore !!!

At the same time, mutation is h…

Replies: 10 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov

This comment was marked as off-topic.

Comment options

You must be logged in to vote
1 reply
@YuriiMotov
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested investigate waiting
9 participants
Converted from issue

This discussion was converted from issue #468 on September 09, 2025 19:11.