Skip to content

Conversation

@NeverBehave
Copy link
Contributor

Fixes: #708

  • When init=False, combine fields from both the initial API response and the object's current state
  • Exclude internal Record metadata using a new INTERNAL_ATTRS constant

@jnovinger jnovinger requested review from a team and jeremystretch and removed request for a team December 18, 2025 18:12
@NeverBehave
Copy link
Contributor Author

There might be a related issue here: #586

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @NeverBehave. I've confirmed the fix but have some suggestions to clean up the logic a bit.

init_vals = None

# Get all field names from _init_cache
init_cache_keys = {k for k, v in self._init_cache}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not just reference set(self._init_cache.keys())?

Copy link
Contributor Author

@NeverBehave NeverBehave Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all_keys = init_cache_keys | obj_keys

# Create list of tuples for consistency with _init_cache format
fields_to_serialize = [(k, None) for k in all_keys]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does fields_to_serialize need to contain tuples? It looks like we're discarding the second item in each in the for loop below.

Copy link
Contributor Author

@NeverBehave NeverBehave Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value will be refetched anyway by the for loop below, which discard the value.

I am trying to keep minimal changes while patching this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assigning assigned_object to None doesn't work unless it's referenced

2 participants