-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #381 from nofusscomputing/376-test-slash-commands
- Loading branch information
Showing
11 changed files
with
2,037 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
from django import dispatch | ||
from django.dispatch import receiver | ||
|
||
from core.models.ticket.ticket_linked_items import TicketLinkedItem | ||
|
||
deleted_model = dispatch.Signal() | ||
|
||
|
||
@receiver(deleted_model) | ||
def signal_deleted_model(sender, item_id, item_type, **kwargs): | ||
"""Clean up model TicketLinkedItems | ||
a model was deleted, remove its link to any tickets it had. | ||
""" | ||
|
||
items = TicketLinkedItem.objects.filter( | ||
item_type = item_type, | ||
item = item_id | ||
) | ||
|
||
items.delete() |
Oops, something went wrong.