Parcourir la source

[fix] in_install_app is in_install

version-14
Rushabh Mehta il y a 10 ans
Parent
révision
d4393365e4
7 fichiers modifiés avec 9 ajouts et 9 suppressions
  1. +1
    -1
      frappe/defaults.py
  2. +1
    -1
      frappe/desk/doctype/feed/feed.py
  3. +1
    -1
      frappe/desk/notifications.py
  4. +2
    -2
      frappe/installer.py
  5. +1
    -1
      frappe/model/db_schema.py
  6. +2
    -2
      frappe/model/delete_doc.py
  7. +1
    -1
      frappe/website/doctype/website_settings/website_settings.py

+ 1
- 1
frappe/defaults.py Voir le fichier

@@ -184,7 +184,7 @@ def clear_cache(user=None):
to_clear = []
if user:
to_clear = [user]
elif frappe.flags.in_install_app!="frappe":
elif frappe.flags.in_install!="frappe":
try:
to_clear = frappe.db.sql_list("select name from tabUser")
except Exception, e:


+ 1
- 1
frappe/desk/doctype/feed/feed.py Voir le fichier

@@ -53,7 +53,7 @@ def has_permission(doc, user):

def update_feed(doc, method=None):
"adds a new feed"
if frappe.flags.in_patch or frappe.flags.in_install_app or frappe.flags.in_import:
if frappe.flags.in_patch or frappe.flags.in_install or frappe.flags.in_import:
return

if doc.doctype == "Feed":


+ 1
- 1
frappe/desk/notifications.py Voir le fichier

@@ -6,7 +6,7 @@ import frappe

@frappe.whitelist()
def get_notifications():
if frappe.flags.in_install_app:
if frappe.flags.in_install:
return

config = get_notification_config()


+ 2
- 2
frappe/installer.py Voir le fichier

@@ -88,7 +88,7 @@ def make_connection(root_login, root_password):
return frappe.database.Database(user=root_login, password=root_password)

def install_app(name, verbose=False, set_as_patched=True):
frappe.flags.in_install_app = name
frappe.flags.in_install = name
frappe.clear_cache()

app_hooks = frappe.get_hooks(app_name=name)
@@ -124,7 +124,7 @@ def install_app(name, verbose=False, set_as_patched=True):
print "Installing Fixtures..."
sync_fixtures(name)

frappe.flags.in_install_app = False
frappe.flags.in_install = False

def add_to_installed_apps(app_name, rebuild_website=True):
installed_apps = frappe.get_installed_apps()


+ 1
- 1
frappe/model/db_schema.py Voir le fichier

@@ -138,7 +138,7 @@ class DbTable:
fl = frappe.db.sql("SELECT * FROM tabDocField WHERE parent = %s", self.doctype, as_dict = 1)
precisions = {}

if not frappe.flags.in_install_app:
if not frappe.flags.in_install:
custom_fl = frappe.db.sql("""\
SELECT * FROM `tabCustom Field`
WHERE dt = %s AND docstatus < 2""", (self.doctype,), as_dict=1)


+ 2
- 2
frappe/model/delete_doc.py Voir le fichier

@@ -104,7 +104,7 @@ def delete_from_table(doctype, name, ignore_doctypes, doc):
and parent=%s""".format(field_doctype), doctype)

tables = get_table_fields("DocField")
if not frappe.flags.in_install_app=="frappe":
if not frappe.flags.in_install=="frappe":
tables += get_table_fields("Custom Field")

# delete from child tables
@@ -166,7 +166,7 @@ def delete_linked_todos(doc):
def insert_feed(doc):
from frappe.utils import get_fullname

if frappe.flags.in_install_app or frappe.flags.in_import or doc.get("ignore_feed"):
if frappe.flags.in_install or frappe.flags.in_import or doc.get("ignore_feed"):
return

frappe.get_doc({


+ 1
- 1
frappe/website/doctype/website_settings/website_settings.py Voir le fichier

@@ -16,7 +16,7 @@ class WebsiteSettings(Document):
self.validate_home_page()

def validate_home_page(self):
if frappe.flags.in_install_app:
if frappe.flags.in_install:
return
if self.home_page and not resolve_route(self.home_page):
frappe.throw(_("Invalid Home Page") + " (Standard pages - index, login, products, blog, about, contact)")


Chargement…
Annuler
Enregistrer