Merge pull request #6692 from Zlash65/mobile-fix

[Minor] Mobile app related fix
This commit is contained in:
Saurabh 2018-12-28 11:50:09 +05:30 committed by GitHub
commit f24cb757bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,8 +70,13 @@ def get_desk_assets(build_version):
pass
for path in data["include_css"]:
with open(os.path.join(frappe.local.sites_path, path) ,"r") as f:
assets[1]["data"] = assets[1]["data"] + "\n" + frappe.safe_decode(f.read(), "utf-8")
if path.startswith('/assets/'):
path = path.replace('/assets/', 'assets/')
try:
with open(os.path.join(frappe.local.sites_path, path) ,"r") as f:
assets[1]["data"] = assets[1]["data"] + "\n" + frappe.safe_decode(f.read(), "utf-8")
except IOError:
pass
return {
"build_version": data["build_version"],