kopia lustrzana https://github.com/wagtail/wagtail
fix: signal receivers example raising exception
Signal receivers must accept `**kwargs`, otherwise one runs into this: ``` File "/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 94, in connect raise ValueError("Signal receivers must accept keyword arguments (**kwargs).") ValueError: Signal receivers must accept keyword arguments (**kwargs). ```pull/6681/head
rodzic
14f63519c2
commit
a726c93df4
|
@ -192,12 +192,12 @@ This signal handler would trigger the invalidation of the index page using the
|
|||
|
||||
|
||||
@receiver(page_published, sender=BlogPage)
|
||||
def blog_published_handler(instance):
|
||||
def blog_published_handler(instance, **kwargs):
|
||||
blog_page_changed(instance)
|
||||
|
||||
|
||||
@receiver(pre_delete, sender=BlogPage)
|
||||
def blog_deleted_handler(instance):
|
||||
def blog_deleted_handler(instance, **kwargs):
|
||||
blog_page_changed(instance)
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue