Merge pull request #11770 from surajshetty3416/fix-random-cookie-failure
fix: Build cookie jar only if request object is present
This commit is contained in:
commit
d7bda21769
1 changed files with 1 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ def prepare_options(html, options):
|
|||
|
||||
def get_cookie_options():
|
||||
options = {}
|
||||
if frappe.session and frappe.session.sid:
|
||||
if frappe.session and frappe.session.sid and hasattr(frappe.local, "request"):
|
||||
# Use wkhtmltopdf's cookie-jar feature to set cookies and restrict them to host domain
|
||||
cookiejar = "/tmp/{}.jar".format(frappe.generate_hash())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue