

def resolve_attr(self, obj, attr):
    if (not hasattr(obj, attr)):
        return reduce(getattr, attr.split('.'), obj)
    if hasattr(getattr(obj, attr), '__call__'):
        return getattr(obj, attr)()
    else:
        return getattr(obj, attr)

dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/models/group.py BaseProcessData.resolve_attr/original