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

Merge branch 'f-simple-schema-export' into f-schema-export-references

parents fcc99597 a1b4ffc9
No related branches found
No related tags found
2 merge requests!89ENH: JsonSchemaExporter accepts do_not_create parameter.,!81F schema export references
Pipeline #42883 passed
This commit is part of merge request !81. Comments created here will be created in the context of that merge request.
...@@ -207,18 +207,16 @@ class BaseTableExporter(object): ...@@ -207,18 +207,16 @@ class BaseTableExporter(object):
logger.error(errmssg) logger.error(errmssg)
def _call_find_function(self, find_function, e): def _call_find_function(self, find_function, e):
account_for_self = 0
if callable(find_function): if callable(find_function):
find_fun = find_function find_fun = find_function
else: else:
find_fun = getattr(self, find_function) find_fun = getattr(self, find_function)
account_for_self = 1
sig = signature(find_fun) sig = signature(find_fun)
params = sig.parameters params = sig.parameters
if len(params) > (account_for_self + 1): if len(params) > 1:
return find_fun(self.record, e) return find_fun(self.record, e)
elif len(params) > account_for_self: elif len(params) > 0:
return find_fun(self.record) return find_fun(self.record)
return find_fun() 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