diff --git a/frappe/utils/background_jobs.py b/frappe/utils/background_jobs.py index 5587704c27..ef345c67df 100755 --- a/frappe/utils/background_jobs.py +++ b/frappe/utils/background_jobs.py @@ -36,9 +36,7 @@ def enqueue(method, queue='default', timeout=None, event=None, :param kwargs: keyword arguments to be passed to the method ''' # To handle older implementations - if 'async' in kwargs: - is_async = True - del kwargs['async'] + is_async = kwargs.pop('async', is_async) if now or frappe.flags.in_migrate: return frappe.call(method, **kwargs)