Commit 06d680cd by Calen Pennington

Don't use Empty directly, let the manager handle it

parent 9dc48c00
...@@ -72,7 +72,7 @@ class RoleBase(AccessRole): ...@@ -72,7 +72,7 @@ class RoleBase(AccessRole):
""" """
Roles by type (e.g., instructor, beta_user) and optionally org, course_key Roles by type (e.g., instructor, beta_user) and optionally org, course_key
""" """
def __init__(self, role_name, org='', course_key=CourseKeyField.Empty): def __init__(self, role_name, org='', course_key=None):
""" """
Create role from required role_name w/ optional org and course_key. You may just provide a role Create role from required role_name w/ optional org and course_key. You may just provide a role
name if it's a global role (not constrained to an org or course). Provide org if constrained to name if it's a global role (not constrained to an org or course). Provide org if constrained to
...@@ -81,9 +81,6 @@ class RoleBase(AccessRole): ...@@ -81,9 +81,6 @@ class RoleBase(AccessRole):
""" """
super(RoleBase, self).__init__() super(RoleBase, self).__init__()
if course_key is None:
raise TypeError('course_key must be CourseKeyField.Empty or a valid CourseKey')
self.org = org self.org = org
self.course_key = course_key self.course_key = course_key
self._role_name = role_name self._role_name = role_name
......
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