Skip to content
Snippets Groups Projects
Verified Commit c64812c0 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: fix table export find_func

parent c8c555b2
No related branches found
No related tags found
1 merge request!89ENH: JsonSchemaExporter accepts do_not_create parameter.
......@@ -207,18 +207,16 @@ class BaseTableExporter(object):
logger.error(errmssg)
def _call_find_function(self, find_function, e):
account_for_self = 0
if callable(find_function):
find_fun = find_function
else:
find_fun = getattr(self, find_function)
account_for_self = 1
sig = signature(find_fun)
params = sig.parameters
if len(params) > (account_for_self + 1):
if len(params) > 1:
return find_fun(self.record, e)
elif len(params) > account_for_self:
elif len(params) > 0:
return find_fun(self.record)
return find_fun()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment