ソースを参照

Fix in Get Sitemap Options

version-14
Anand Doshi 11年前
コミット
b5585e23ec
1個のファイルの変更3行の追加3行の削除
  1. +3
    -3
      webnotes/webutils.py

+ 3
- 3
webnotes/webutils.py ファイルの表示

@@ -116,16 +116,16 @@ def get_context(path):
def get_sitemap_options(path):
sitemap_options = None
cache_key = "sitemap_options:{}".format(path)
if can_cache():
sitemap_options = webnotes._dict(webnotes.cache().get_value(cache_key))
sitemap_options = webnotes.cache().get_value(cache_key)

if not sitemap_options:
sitemap_options = build_sitemap_options(path)
if can_cache(sitemap_options.no_cache):
webnotes.cache().set_value(cache_key, sitemap_options)
return sitemap_options
return webnotes._dict(sitemap_options)
def build_sitemap_options(path):
sitemap_options = webnotes.doc("Website Sitemap", path).fields


読み込み中…
キャンセル
保存