mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Cart: fix call to del if attribute is unknown when rendering a form label
This commit is contained in:
@@ -37,7 +37,8 @@ def render_label(content, label_for=None, label_class=None, label_title='', labe
|
||||
attrs['class'] += ' label-empty'
|
||||
# usually checkboxes have overall empty labels and special labels per checkbox
|
||||
# => remove for-attribute as well as "required"-text appended to label
|
||||
del(attrs['for'])
|
||||
if 'for' in attrs:
|
||||
del(attrs['for'])
|
||||
else:
|
||||
opt += '<i class="sr-only label-required">, {}</i>'.format(pgettext('form', 'required')) if not optional else ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user