Fixes in data import and login
This commit is contained in:
parent
951875e53f
commit
57e517cee9
4 changed files with 6 additions and 6 deletions
|
|
@ -176,7 +176,7 @@ def get_template(doctype=None, parent_doctype=None, all_doctypes="No", with_data
|
|||
frappe.permissions.can_export(parent_doctype, raise_exception=True)
|
||||
|
||||
# get permitted data only
|
||||
data = reportview.execute(doctype, fields="*")
|
||||
data = reportview.execute(doctype, fields=["*"], limit_page_length=None)
|
||||
for doc in data:
|
||||
# add main table
|
||||
row_group = []
|
||||
|
|
@ -512,7 +512,7 @@ def export_json(doctype, name, path):
|
|||
del d["parent"]
|
||||
del d["name"]
|
||||
d["__islocal"] = 1
|
||||
outfile.write(json.dumps(doclist, default=json_handler, indent=1, sort_keys=True))
|
||||
outfile.write(json.dumps([doclist], default=json_handler, indent=1, sort_keys=True))
|
||||
|
||||
def import_doclist(path, overwrite=False, ignore_links=False, ignore_insert=False, insert=False):
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ login.login_handlers = {
|
|||
} else {
|
||||
window.location.href = "/index";
|
||||
}
|
||||
} else if(window.is_sign_up) {
|
||||
} else if(["#signup", "#forgot"].indexOf(window.location.hash)!==-1) {
|
||||
frappe.msgprint(data.message);
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from frappe.utils import encode, cstr, cint, flt
|
|||
def read_csv_content_from_uploaded_file(ignore_encoding=False):
|
||||
if getattr(frappe, "uploaded_file", None):
|
||||
with open(frappe.uploaded_file, "r") as upfile:
|
||||
fcontent = upfile
|
||||
fcontent = upfile.read()
|
||||
else:
|
||||
from frappe.utils.file_manager import get_uploaded_content
|
||||
fname, fcontent = get_uploaded_content()
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ $.extend(frappe, {
|
|||
dataType: "json",
|
||||
statusCode: {
|
||||
404: function(xhr) {
|
||||
msgprint("Not Found");
|
||||
frappe.msgprint("Not Found");
|
||||
},
|
||||
403: function(xhr) {
|
||||
msgprint("Not Permitted");
|
||||
frappe.msgprint("Not Permitted");
|
||||
},
|
||||
200: function(data, xhr) {
|
||||
if(opts.callback)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue