mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-13 07:33:10 +00:00
Assign copy of kwargs instead of direct reference
Make a shallow copy of kwargs and assign it to the data attribute. It allows overriding the save method of the model which can modify data if needed.
This commit is contained in:
parent
ba81517243
commit
efdd3ab086
1 changed files with 1 additions and 1 deletions
|
|
@ -320,7 +320,7 @@ def notify_handler(verb, **kwargs):
|
|||
ContentType.objects.get_for_model(obj))
|
||||
|
||||
if kwargs and EXTRA_DATA:
|
||||
newnotify.data = kwargs
|
||||
newnotify.data = kwargs.copy()
|
||||
|
||||
newnotify.save()
|
||||
new_notifications.append(newnotify)
|
||||
|
|
|
|||
Loading…
Reference in a new issue