Change notification backend
This commit is contained in:
parent
5f97491f0d
commit
7f854c40dd
15 changed files with 188 additions and 134 deletions
|
@ -49,16 +49,10 @@ ticket_widget = (
|
|||
|
||||
def add_ticket_notifications(users, author, link, ticket):
|
||||
html = f'<a href="{link}">{ticket.linked_item}</a>'
|
||||
|
||||
users = set(users)
|
||||
if author in users:
|
||||
users.remove(author)
|
||||
|
||||
for user in users:
|
||||
notification = Notification(
|
||||
owner=user, html_link=html, category="Ticket", author=author
|
||||
)
|
||||
notification.save()
|
||||
make_notification(users, "Ticket", html, author)
|
||||
|
||||
|
||||
class TicketForm(forms.Form):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue