mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
6347 remove counters dict
This commit is contained in:
parent
58f737c6a3
commit
b98fecd188
@ -5,8 +5,6 @@ from functools import partial
|
|||||||
from .fields import CounterCacheField
|
from .fields import CounterCacheField
|
||||||
from .mixins import TrackingModelMixin
|
from .mixins import TrackingModelMixin
|
||||||
|
|
||||||
counters = {}
|
|
||||||
|
|
||||||
|
|
||||||
def post_save_receiver_counter(counter_instance, sender, instance, created, **kwargs):
|
def post_save_receiver_counter(counter_instance, sender, instance, created, **kwargs):
|
||||||
if created:
|
if created:
|
||||||
@ -69,8 +67,6 @@ class Counter:
|
|||||||
dispatch_uid=f'{counted_name}_post_delete',
|
dispatch_uid=f'{counted_name}_post_delete',
|
||||||
)
|
)
|
||||||
|
|
||||||
counters[counted_name] = self
|
|
||||||
|
|
||||||
def parent_id(self, child):
|
def parent_id(self, child):
|
||||||
return getattr(child, self.foreign_key_field.attname)
|
return getattr(child, self.foreign_key_field.attname)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user