Skip to content

Commit cb711da

Browse files
committed
Cleanup from merge conflict resolution
1 parent 0af1dbf commit cb711da

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

netbox/utilities/counters.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ def connect_counters(*models):
9595

9696
for model in models:
9797
# Find all CounterCacheFields on the model
98-
counter_fields = [
99-
field for field in model._meta.get_fields() if isinstance(field, CounterCacheField)
100-
]
98+
counter_fields = [field for field in model._meta.get_fields() if isinstance(field, CounterCacheField)]
10199

102100
for field in counter_fields:
103101
to_model = apps.get_model(field.to_model_name)
@@ -113,13 +111,6 @@ def connect_counters(*models):
113111
# Ensure dispatch_uid is unique per model (sender), not per field
114112
uid_base = f'countercache.{to_model._meta.label_lower}'
115113

116-
# Connect signals once per child model
117-
if to_model in connected:
118-
continue
119-
120-
# Ensure dispatch_uid is unique per model (sender), not per field
121-
uid_base = f"countercache.{to_model._meta.label_lower}"
122-
123114
# Connect the post_save and post_delete handlers
124115
post_save.connect(
125116
post_save_receiver,

0 commit comments

Comments
 (0)