Commit 84ed2804 by Toby Lawrence

Quality fixes!

parent dacdbae1
......@@ -55,6 +55,7 @@ class RoleCache(object):
)
def add_role(self, role):
"""Adds a role to the cache."""
self._roles.add(role)
......@@ -160,6 +161,7 @@ class RoleBase(AccessRole):
entry = CourseAccessRole(user=user, role=self._role_name, course_id=self.course_key, org=self.org)
entry.save()
if hasattr(user, '_roles'):
# pylint: disable=protected-access
user._roles.add_role(entry)
def remove_users(self, *users):
......
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