mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
user_groups: Move constants for system group names to a new class.
This commit moves constants for system group names to a new "SystemGroups" class so that we can use these group names in multiple classes in models.py without worrying about the order of defining them.
This commit is contained in:
@@ -95,6 +95,7 @@ from zerver.models import (
|
||||
Recipient,
|
||||
Stream,
|
||||
Subscription,
|
||||
SystemGroups,
|
||||
UserGroup,
|
||||
UserGroupMembership,
|
||||
UserMessage,
|
||||
@@ -1350,7 +1351,7 @@ Output:
|
||||
realm, invite_only, history_public_to_subscribers
|
||||
)
|
||||
administrators_user_group = UserGroup.objects.get(
|
||||
name=UserGroup.ADMINISTRATORS_GROUP_NAME, realm=realm, is_system_group=True
|
||||
name=SystemGroups.ADMINISTRATORS, realm=realm, is_system_group=True
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user