Selaa lähdekoodia

Replaced mixed usage of tabs and spaces for indents with tabs only (#3828)

version-14
Aditya Hase 8 vuotta sitten
committed by Makarand Bauskar
vanhempi
commit
774c5fd2c6
4 muutettua tiedostoa jossa 10 lisäystä ja 10 poistoa
  1. +1
    -1
      frappe/core/page/data_import_tool/exporter.py
  2. +6
    -6
      frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py
  3. +1
    -1
      frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py
  4. +2
    -2
      frappe/model/db_schema.py

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

@@ -284,7 +284,7 @@ def get_template(doctype=None, parent_doctype=None, all_doctypes="No", with_data
if from_data_import == "Yes" and excel_format == "Yes":
filename = frappe.generate_hash("", 10)
with open(filename, 'wb') as f:
f.write(cstr(w.getvalue()).encode("utf-8"))
f.write(cstr(w.getvalue()).encode("utf-8"))
f = open(filename)
reader = csv.reader(f)



+ 6
- 6
frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py Näytä tiedosto

@@ -16,12 +16,12 @@ def execute(filters=None):
data = frappe.get_list(doctype, fields=fields, as_list=True, user=user)

if show_permissions:
columns = columns + ["Read", "Write", "Create", "Delete", "Submit", "Cancel", "Amend", "Print", "Email",
"Report", "Import", "Export", "Share"]
data = list(data)
for i,item in enumerate(data):
temp = frappe.permissions.get_doc_permissions(frappe.get_doc(doctype, item[0]), False,user)
data[i] = item+(temp.get("read"),temp.get("write"),temp.get("create"),temp.get("delete"),temp.get("submit"),temp.get("cancel"),temp.get("amend"),temp.get("print"),temp.get("email"),temp.get("report"),temp.get("import"),temp.get("export"),temp.get("share"),)
columns = columns + ["Read", "Write", "Create", "Delete", "Submit", "Cancel", "Amend", "Print", "Email",
"Report", "Import", "Export", "Share"]
data = list(data)
for i,item in enumerate(data):
temp = frappe.permissions.get_doc_permissions(frappe.get_doc(doctype, item[0]), False,user)
data[i] = item+(temp.get("read"),temp.get("write"),temp.get("create"),temp.get("delete"),temp.get("submit"),temp.get("cancel"),temp.get("amend"),temp.get("print"),temp.get("email"),temp.get("report"),temp.get("import"),temp.get("export"),temp.get("share"),)

return columns, data



+ 1
- 1
frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py Näytä tiedosto

@@ -9,5 +9,5 @@ from frappe.model.document import Document
class OAuthBearerToken(Document):
def validate(self):
if not self.expiration_time:
self.expiration_time = frappe.utils.datetime.datetime.strptime(self.creation, "%Y-%m-%d %H:%M:%S.%f") + frappe.utils.datetime.timedelta(seconds=self.expires_in)
self.expiration_time = frappe.utils.datetime.datetime.strptime(self.creation, "%Y-%m-%d %H:%M:%S.%f") + frappe.utils.datetime.timedelta(seconds=self.expires_in)


+ 2
- 2
frappe/model/db_schema.py Näytä tiedosto

@@ -464,8 +464,8 @@ class DbManager:
"""
Pass root_conn here for access to all databases.
"""
if db:
self.db = db
if db:
self.db = db

def get_current_host(self):
return self.db.sql("select user()")[0][0].split('@')[1]


Ladataan…
Peruuta
Tallenna