Skip to content

Commit

Permalink
Merge pull request getsentry#713 from getsentry/getsentrygh-712
Browse files Browse the repository at this point in the history
django: ignore a missing settings.SITE_ID
  • Loading branch information
mattrobenolt committed Jan 5, 2016
2 parents d6b52c9 + 2f6fc14 commit 8c14346
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion raven/contrib/django/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ def build_msg(self, *args, **kwargs):
data['tags'].setdefault('site', site_name)
except Exception:
# Database error? Fallback to the id
data['tags'].setdefault('site', settings.SITE_ID)
try:
data['tags'].setdefault('site', settings.SITE_ID)
except AttributeError:
# SITE_ID wasn't set, so just ignore
pass

return data

Expand Down

0 comments on commit 8c14346

Please sign in to comment.