|
6 | 6 |
|
7 | 7 | import debug # pyflakes:ignore |
8 | 8 |
|
9 | | -from ietf.group.models import Group, RoleHistory, Role |
10 | | -from ietf.person.models import Email |
11 | | -from ietf.utils.history import get_history_object_for, copy_many_to_many_for_history |
12 | | -from ietf.ietfauth.utils import has_role |
13 | 9 | from ietf.community.models import CommunityList, SearchRule |
14 | 10 | from ietf.community.utils import reset_name_contains_index_for_rule, can_manage_community_list |
15 | 11 | from ietf.doc.models import Document, State |
| 12 | +from ietf.group.models import Group, RoleHistory, Role |
| 13 | +from ietf.ietfauth.utils import has_role |
| 14 | +from ietf.person.models import Email |
16 | 15 | from ietf.review.utils import can_manage_review_requests_for_team |
17 | | - |
| 16 | +from ietf.utils import log |
| 17 | +from ietf.utils.history import get_history_object_for, copy_many_to_many_for_history |
18 | 18 |
|
19 | 19 | def save_group_in_history(group): |
20 | 20 | """This should be called before saving changes to a Group instance, |
@@ -95,6 +95,7 @@ def save_milestone_in_history(milestone): |
95 | 95 | def can_manage_group_type(user, group, type_id=None): |
96 | 96 | if type_id is None: |
97 | 97 | type_id = group.type_id |
| 98 | + log.assertion("isinstance(type_id, (type(''), type(u'')))") |
98 | 99 | if type_id == "rg": |
99 | 100 | return has_role(user, ('IRTF Chair', 'Secretariat')) |
100 | 101 | elif type_id == "wg": |
|
0 commit comments