forked from CGM_Public/pretix_original
Fix Keyerror when updating event comment
This commit is contained in:
@@ -1136,7 +1136,7 @@ class TicketSettingsForm(SettingsForm):
|
|||||||
class CommentForm(I18nModelForm):
|
class CommentForm(I18nModelForm):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.readonly = kwargs.pop('readonly')
|
self.readonly = kwargs.pop('readonly', None)
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
if self.readonly:
|
if self.readonly:
|
||||||
self.fields['comment'].widget.attrs['readonly'] = 'readonly'
|
self.fields['comment'].widget.attrs['readonly'] = 'readonly'
|
||||||
|
|||||||
Reference in New Issue
Block a user