base_jsonify: fix _function_value -> bind to record

pull/2418/head
Simone Orsi 2021-02-05 10:57:53 +01:00 committed by Sébastien BEAU
parent 9635b0b32d
commit 0127a7ef09
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class Base(models.AbstractModel):
def _function_value(self, record, function, field_name):
if function in dir(record):
method = getattr(self, function, None)
method = getattr(record, function, None)
return method(field_name)
elif callable(function):
return function(record, field_name)