Selaa lähdekoodia

Fixes in data import and login

version-14
Anand Doshi 11 vuotta sitten
vanhempi
commit
57e517cee9
4 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. +2
    -2
      frappe/core/page/data_import_tool/data_import_tool.py
  2. +1
    -1
      frappe/templates/includes/login.js
  3. +1
    -1
      frappe/utils/datautils.py
  4. +2
    -2
      frappe/website/js/website.js

+ 2
- 2
frappe/core/page/data_import_tool/data_import_tool.py Näytä tiedosto

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


+ 1
- 1
frappe/templates/includes/login.js Näytä tiedosto

@@ -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);
}
},


+ 1
- 1
frappe/utils/datautils.py Näytä tiedosto

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


+ 2
- 2
frappe/website/js/website.js Näytä tiedosto

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


Ladataan…
Peruuta
Tallenna