Remove redundant check in signals.py #8778

Closed
opened 2025-12-29 20:41:05 +01:00 by adam · 0 comments
Owner

Originally created by @arthanson on GitHub (Oct 25, 2023).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

https://github.com/netbox-community/netbox/blob/develop/netbox/extras/signals.py#L66 if hasattr(instance, 'to_objectchange'): is redundant as it is already checked in line 45

Justification

Line is redundant as it is checked for earlier in the function.

Originally created by @arthanson on GitHub (Oct 25, 2023). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes https://github.com/netbox-community/netbox/blob/develop/netbox/extras/signals.py#L66 `if hasattr(instance, 'to_objectchange'):` is redundant as it is already checked in line 45 ### Justification Line is redundant as it is checked for earlier in the function.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 20:41:05 +01:00
adam closed this issue 2025-12-29 20:41:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8778