Skip to content

Commit

Permalink
Merge branch 'develop' into feature_delices
Browse files Browse the repository at this point in the history
  • Loading branch information
abates committed Jul 31, 2023
2 parents 2c7c1a4 + 336f9b2 commit c1221e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions design_builder/contrib/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,6 @@ def attribute(self, value, model_instance) -> None:
retval["endpoints"] = [endpoint_a, endpoint_z]
endpoint_a.attributes["peering"] = model_instance
endpoint_z.attributes["peering"] = model_instance

model_instance.connect(ModelInstance.POST_SAVE, BGPPeeringExtension._post_save)
return retval
8 changes: 7 additions & 1 deletion design_builder/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ def connect(self, signal: Signal, handler):
signal: Signal to listen for.
handler: Callback function
"""
signal.connect(handler, self)
dispatch_id = (
self.model_class._meta.app_label,
self.model_class._meta.model_name,
id(handler),
)

signal.connect(handler, self, dispatch_uid=dispatch_id)

def _load_instance(self):
query_filter = _map_query_values(self.filter)
Expand Down

0 comments on commit c1221e1

Please sign in to comment.