django-oidc-provider/oidc_provider/compat.py

6 lines
136 B
Python
Raw Normal View History

2018-02-01 17:00:57 +00:00
def get_attr_or_callable(obj, name):
target = getattr(obj, name)
if callable(target):
return target()
return target