From c64812c064e99ee56c5f84a9d8454870d0c16ad9 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Thu, 26 Oct 2023 03:59:13 +0200 Subject: [PATCH] BUG: fix table export find_func --- src/caosadvancedtools/table_export.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/caosadvancedtools/table_export.py b/src/caosadvancedtools/table_export.py index e8232719..eabb1075 100644 --- a/src/caosadvancedtools/table_export.py +++ b/src/caosadvancedtools/table_export.py @@ -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() -- GitLab