projects
/
osm
/
LW-UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into v6.0
[osm/LW-UI.git]
/
authosm
/
models.py
diff --git
a/authosm/models.py
b/authosm/models.py
index
f968dfa
..
74c1f1e
100644
(file)
--- a/
authosm/models.py
+++ b/
authosm/models.py
@@
-93,11
+93,10
@@
class AbstractOsmUser(AbstractBaseUser, PermissionsMixin):
def get_projects(self):
client = Client()
user_info = client.get_user_info(self.get_token(), self.username)
def get_projects(self):
client = Client()
user_info = client.get_user_info(self.get_token(), self.username)
- projects = client.get_projects(self.get_token(), user_info['data']['projects'])
- if 'error' in projects and projects['error'] is True:
+ if 'error' in user_info and user_info['error'] is True:
return []
else:
return []
else:
- return
projects['data
']
+ return
user_info['data']['project_role_mappings
']
def switch_project(self, project_id):
client = Client()
def switch_project(self, project_id):
client = Client()