trivial: fix consider-using-ternary pylint warning (#52732)
This commit is contained in:
parent
531d15fd76
commit
fc780d27a7
|
@ -14,7 +14,6 @@ disable=
|
|||
broad-except,
|
||||
consider-using-dict-comprehension,
|
||||
consider-using-set-comprehension,
|
||||
consider-using-ternary,
|
||||
cyclic-import,
|
||||
deprecated-module,
|
||||
disallowed-name,
|
||||
|
|
|
@ -209,7 +209,7 @@ class SubmitWidget(quixote.form.widget.SubmitWidget):
|
|||
def render_content(self):
|
||||
if self.name in ('cancel', 'previous', 'save-draft'):
|
||||
self.attrs['formnovalidate'] = 'formnovalidate'
|
||||
value = self.label and htmlescape(self.label) or None
|
||||
value = htmlescape(self.label) if self.label else None
|
||||
return (
|
||||
htmltag('button', name=self.name, value=value, **self.attrs) + self.label + htmltext('</button>')
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue