[minor] move add_sidebar_items to the top
This commit is contained in:
parent
9135fcbb44
commit
205b349880
3 changed files with 6 additions and 6 deletions
|
|
@ -21,7 +21,7 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False,
|
|||
ignore_links=False, pre_process=None, via_console=False):
|
||||
"""upload data"""
|
||||
frappe.flags.mute_emails = True
|
||||
frappe.flags.in_upload = True
|
||||
frappe.flags.in_import = True
|
||||
|
||||
# extra input params
|
||||
params = json.loads(frappe.form_dict.get("params") or '{}')
|
||||
|
|
@ -277,7 +277,7 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False,
|
|||
frappe.db.commit()
|
||||
|
||||
frappe.flags.mute_emails = False
|
||||
frappe.flags.in_upload = False
|
||||
frappe.flags.in_import = False
|
||||
|
||||
return {"messages": ret, "error": error}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ def random_string(length):
|
|||
|
||||
def has_gravatar(email):
|
||||
'''Returns gravatar url if user has set an avatar at gravatar.com'''
|
||||
if (frappe.flags.in_upload
|
||||
if (frappe.flags.in_import
|
||||
or frappe.flags.in_install
|
||||
or frappe.flags.in_test):
|
||||
# no gravatar if via upload
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ def build_context(context):
|
|||
context.update(get_website_settings())
|
||||
context.update(frappe.local.conf.get("website_context") or {})
|
||||
|
||||
if context.show_sidebar:
|
||||
add_sidebar_data(context)
|
||||
|
||||
# provide doc
|
||||
if context.doc:
|
||||
context.update(context.doc.as_dict())
|
||||
|
|
@ -75,9 +78,6 @@ def build_context(context):
|
|||
if hasattr(module, "get_children"):
|
||||
context.children = module.get_children(context)
|
||||
|
||||
if context.show_sidebar:
|
||||
add_sidebar_data(context)
|
||||
|
||||
add_metatags(context)
|
||||
|
||||
# determine templates to be used
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue