Commit c41ec503 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

fix(black): fix forgottent black

parent 7eb5b456b7e2
Pipeline #60668 passed with stages
in 1 minute and 17 seconds
...@@ -49,6 +49,8 @@ class EditorJS(fw.TextArea): ...@@ -49,6 +49,8 @@ class EditorJS(fw.TextArea):
old_get_widget = formfields.RichTextField.get_widget old_get_widget = formfields.RichTextField.get_widget
@monkeypatch(formfields.RichTextField) @monkeypatch(formfields.RichTextField)
def get_widget(self, form): def get_widget(self, form):
if self.widget is None: if self.widget is None:
...@@ -58,6 +60,8 @@ def get_widget(self, form): ...@@ -58,6 +60,8 @@ def get_widget(self, form):
old_get_format_field = formfields.RichTextField.get_format_field old_get_format_field = formfields.RichTextField.get_format_field
@monkeypatch(formfields.RichTextField) @monkeypatch(formfields.RichTextField)
def get_format_field(self, form): def get_format_field(self, form):
if self.format_field: if self.format_field:
...@@ -81,6 +85,8 @@ def get_format_field(self, form): ...@@ -81,6 +85,8 @@ def get_format_field(self, form):
old_printable_value = entity.Entity.printable_value old_printable_value = entity.Entity.printable_value
@monkeypatch(entity.Entity) @monkeypatch(entity.Entity)
def printable_value( def printable_value(
self, self,
...@@ -113,9 +119,7 @@ def printable_value( ...@@ -113,9 +119,7 @@ def printable_value(
if attrformat == "application/vnd.cubicweb.editorjs": if attrformat == "application/vnd.cubicweb.editorjs":
self._cw.add_js("cubes.editorjs.js") self._cw.add_js("cubes.editorjs.js")
return f'<textarea cubicweb:type="editorjs" cubicweb:mode="read">{value}</textarea>' return f'<textarea cubicweb:type="editorjs" cubicweb:mode="read">{value}</textarea>'
return old_printable_value( return old_printable_value(self, attr, value, attrtype, format, displaytime)
self, attr, value, attrtype, format, displaytime
)
def includeme(config): def includeme(config):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment