Skip to content

Implement within_fleets filter via entity_fleet_id#4062

Merged
r4victor merged 1 commit into
masterfrom
issue_4054_placeholder_instances_events
Jul 24, 2026
Merged

Implement within_fleets filter via entity_fleet_id#4062
r4victor merged 1 commit into
masterfrom
issue_4054_placeholder_instances_events

Conversation

@r4victor

Copy link
Copy Markdown
Collaborator

Show fleet events about deleted placeholder instances by using entity_fleet_id (see #4059 (comment)).

@r4victor
r4victor requested a review from jvstme July 23, 2026 09:30
fleet_id = model.fleet_id
if fleet_id is None:
# Not-yet-flushed models may only have the fleet relationship set.
fleet = model.__dict__.get("fleet")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(nit) Isn't this equivalent to model.fleet?

>>> i = InstanceModel()
>>> i.__dict__.get("fleet") is None
True
>>> i.fleet is None
True

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, i.fleet may raise sqlalchemy.exc.MissingGreenlet if the attribute is not loaded. i.__dict__.get("fleet") would return None.

@r4victor
r4victor merged commit 2f9618f into master Jul 24, 2026
24 checks passed
@r4victor
r4victor deleted the issue_4054_placeholder_instances_events branch July 24, 2026 05:59
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.

2 participants