fix: Don't assume async value == True

fix: Don't assume async value == True
This commit is contained in:
Suraj Shetty 2019-02-18 08:45:38 +05:30 committed by GitHub
commit c19befeb5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)