Commit eee83e3a by Bach Dániel

dashboard: simplify Notification.send

parent 7eb6a33f
......@@ -70,9 +70,7 @@ class Notification(TimeStampedModel):
def send(cls, user, subject, template, context,
valid_until=None, subject_context=None):
hro = create_readable(template, user=user, **context)
if subject_context is None:
subject_context = context
subject = create_readable(subject, **subject_context)
subject = create_readable(subject, **(subject_context or context))
return cls.objects.create(to=user,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment