Change notification backend

This commit is contained in:
cuom1999 2023-10-10 17:38:48 -05:00
parent 5f97491f0d
commit 7f854c40dd
15 changed files with 188 additions and 134 deletions

View file

@ -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):