Commit d0539a11 by Tom Christie

Merge pull request #2588 from maryokhin/master

Check if sessions are enabled before calling logout.
parents dc8cc860 7345830c
...@@ -209,7 +209,8 @@ class APIClient(APIRequestFactory, DjangoClient): ...@@ -209,7 +209,8 @@ class APIClient(APIRequestFactory, DjangoClient):
self.handler._force_user = None self.handler._force_user = None
self.handler._force_token = None self.handler._force_token = None
return super(APIClient, self).logout() if self.session:
super(APIClient, self).logout()
class APITransactionTestCase(testcases.TransactionTestCase): class APITransactionTestCase(testcases.TransactionTestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment