frappe/env/lib/python3.12/site-packages/rq/compat/connections.py

9 lines
310 B
Python

def fix_return_type(func):
# deliberately no functools.wraps() call here, since the function being
# wrapped is a partial, which has no module
def _inner(*args, **kwargs):
value = func(*args, **kwargs)
if value is None:
value = -1
return value
return _inner