Skip to content

Commit

Permalink
Merge pull request #13 from eea/develop
Browse files Browse the repository at this point in the history
Fix AttributeError PARENTS
  • Loading branch information
avoinea authored Feb 17, 2022
2 parents ac97e16 + 744d165 commit 95480e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

2.4 - (2022-01-13)
---------------------------
* Bug fix: AttributeError PARENTS
[avoinea]

2.3 - (2021-10-11)
---------------------------
* Bug fix: KeyError HTTP_USER_AGENT
Expand Down
4 changes: 2 additions & 2 deletions eea/sentry/browser/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def get_site(request):
if not site:
try:
site = request.PARENTS[0].getSite()
except AttributeError:
except (IndexError, AttributeError):
# We are not in a Naaya Site
pass
if not site:
try:
site = request.PARENTS[-2]
except (IndexError):
except (IndexError, AttributeError):
pass
return site
2 changes: 1 addition & 1 deletion eea/sentry/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3
2.4

0 comments on commit 95480e0

Please sign in to comment.