fix(pdf): frappe.local.request is not available in backgound jobs and tests
Use frappe.utils.get_host_name instead of frappe.local.request.host
This commit is contained in:
parent
3f5f6f3b21
commit
16fc29e48d
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ def get_cookie_options():
|
|||
|
||||
# Remove port from request.host
|
||||
# https://werkzeug.palletsprojects.com/en/0.16.x/wrappers/#werkzeug.wrappers.BaseRequest.host
|
||||
domain = frappe.local.request.host.split(":", 1)[0]
|
||||
domain = frappe.utils.get_host_name().split(":", 1)[0]
|
||||
with open(cookiejar, "w") as f:
|
||||
f.write("sid={}; Domain={};\n".format(frappe.session.sid, domain))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue