Pass subevent to item_descriptions signal

This commit is contained in:
Raphael Michel
2023-09-08 17:33:21 +02:00
parent 8f36e36619
commit 734a116b6f
2 changed files with 5 additions and 5 deletions

View File

@@ -396,11 +396,11 @@ argument will contain the request object.
item_description = EventPluginSignal()
"""
Arguments: ``item``, ``variation``
Arguments: ``item``, ``variation``, ``subevent``
This signal is sent out when the description of an item or variation is rendered and allows you to append
additional text to the description. You are passed the ``item`` and ``variation`` and expected to return
HTML.
additional text to the description. You are passed the ``item``, ``variation`` and ``subevent``. You are
expected to return HTML.
"""
register_cookie_providers = EventPluginSignal()

View File

@@ -262,7 +262,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
continue
item.description = str(item.description)
for recv, resp in item_description.send(sender=event, item=item, variation=None):
for recv, resp in item_description.send(sender=event, item=item, variation=None, subevent=subevent):
if resp:
item.description += ("<br/>" if item.description else "") + resp
@@ -319,7 +319,7 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web', require
continue
var.description = str(var.description)
for recv, resp in item_description.send(sender=event, item=item, variation=var):
for recv, resp in item_description.send(sender=event, item=item, variation=var, subevent=subevent):
if resp:
var.description += ("<br/>" if var.description else "") + resp