django-oidc-provider/oidc_provider/compat.py
2018-02-01 14:00:57 -03:00

5 lines
136 B
Python

def get_attr_or_callable(obj, name):
target = getattr(obj, name)
if callable(target):
return target()
return target