Fix session api (used groups instead of group_ids)

This commit is contained in:
Arik Fraimovich 2016-12-04 14:05:24 +02:00 committed by Allen Short
parent 03b2a416c8
commit a5805d0700
2 changed files with 7 additions and 1 deletions

View File

@ -179,7 +179,7 @@ def session(org_slug=None):
'id': current_user.id,
'name': current_user.name,
'email': current_user.email,
'groups': current_user.groups,
'groups': current_user.group_ids,
'permissions': current_user.permissions
}
else:

View File

@ -65,3 +65,9 @@ class TestLogin(BaseTestCase):
response = self.get_request('/login', org=self.factory.org)
self.assertEqual(response.status_code, 429)
class TestSession(BaseTestCase):
# really simple test just to trigger this route
def test_get(self):
self.make_request('get', '/api/session', user=self.factory.user)