check_credentials() now returns the entire user, not just the ID.

This commit is contained in:
2016-08-26 17:43:07 +02:00
parent 887a9cc697
commit 1df113ca01
4 changed files with 14 additions and 12 deletions

View File

@@ -281,7 +281,8 @@ class PILLAR_OT_sync(pillar.PillarOperatorMixin,
try:
# Refresh credentials
try:
self.user_id = await self.check_credentials(context, REQUIRES_ROLES_FOR_SYNC)
db_user = await self.check_credentials(context, REQUIRES_ROLES_FOR_SYNC)
self.user_id = db_user['_id']
log.debug('Found user ID: %s', self.user_id)
except pillar.NotSubscribedToCloudError:
self.log.exception('User not subscribed to cloud.')