mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-03-17 05:40:25 +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
ab4011eae6
commit
736f641fa3
1 changed files with 1 additions and 1 deletions
|
|
@ -301,7 +301,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