Commit dbe6fd36 by Őry Máté

common: allow omitting admin_text_template in create_readable

parent 205ea343
...@@ -342,8 +342,9 @@ class HumanReadableObject(object): ...@@ -342,8 +342,9 @@ class HumanReadableObject(object):
self.params = params self.params = params
@classmethod @classmethod
def create(cls, user_text_template, admin_text_template, **params): def create(cls, user_text_template, admin_text_template=None, **params):
return cls(user_text_template, admin_text_template, params) return cls(user_text_template,
admin_text_template or user_text_template, params)
@classmethod @classmethod
def from_dict(cls, d): def from_dict(cls, d):
......
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 sign in to comment