Skip to content

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed May 12, 2023
1 parent fa035bb commit 55dbdac
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions djangocms_page_sitemap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ def get_cache_key(page):
"""
Create the cache key for the current page and language
"""
try:
site_id = page.node.site_id
except AttributeError:
site_id = page.site_id
site_id = page.node.site_id
return _get_cache_key("page_sitemap", page, "default", site_id)


Expand All @@ -21,7 +18,7 @@ def is_versioning_enabled():
try:
app_config = apps.get_app_config("djangocms_versioning")
return app_config.cms_extension.is_content_model_versioned(PageContent)
except LookupError:
except LookupError: # pragma: no cover
return False
except ImportError:
return False

0 comments on commit 55dbdac

Please sign in to comment.