From eb16a476baa35d74a562515cce473c43dba8b70a Mon Sep 17 00:00:00 2001 From: erickmk Date: Mon, 19 Dec 2016 14:05:52 +0300 Subject: [PATCH] replace self with cls for class method --- CONTRIBUTORS.rst | 1 + wagtail/wagtailadmin/edit_handlers.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index dd187228de..ef396b3e6c 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -196,6 +196,7 @@ Contributors * Marco Fucci * Mihail Russu * Robert Slotboom +* Erick M'bwana Translators =========== diff --git a/wagtail/wagtailadmin/edit_handlers.py b/wagtail/wagtailadmin/edit_handlers.py index b028f436d1..97b5d64476 100644 --- a/wagtail/wagtailadmin/edit_handlers.py +++ b/wagtail/wagtailadmin/edit_handlers.py @@ -448,8 +448,8 @@ class BaseFieldPanel(EditHandler): return mark_safe(render_to_string(self.field_template, context)) @classmethod - def required_fields(self): - return [self.field_name] + def required_fields(cls): + return [cls.field_name] class FieldPanel(object):