Skip to content
This repository was archived by the owner on Jun 11, 2018. It is now read-only.

Commit

Permalink
fixup! django: get_client_class: use CLIENT setting
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jul 5, 2016
1 parent fd8646c commit 9ce3e71
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions opbeat/contrib/django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,14 @@ def get_client(client=None):

tmp_client = client is not None
if not tmp_client:
client = get_client_class()
config = getattr(django_settings, 'OPBEAT', {})
client_path = config.get('CLIENT', default_client_class)

if _client[0] != client:
client_class = get_client_class(client)
if _client[0] != client_path:
client_class = get_client_class(client_path)
instance = client_class(**get_client_config())
if not tmp_client:
_client = (client, instance)
_client = (client_path, instance)
return instance
return _client[1]

Expand Down

0 comments on commit 9ce3e71

Please sign in to comment.