support: Exclude system bot realm from remote realm query.

This commit is contained in:
Lauryn Menard 2023-12-12 15:49:01 +01:00 committed by Tim Abbott
parent 89c2740342
commit 449714245e
1 changed files with 3 additions and 1 deletions

View File

@ -481,7 +481,9 @@ def remote_servers_support(
remote_realms: Dict[int, List[RemoteRealm]] = {}
for remote_server in remote_servers:
# Get remote realms attached to remote server
remote_realms_for_server = list(remote_server.remoterealm_set.all())
remote_realms_for_server = list(
remote_server.remoterealm_set.exclude(is_system_bot_realm=True)
)
remote_realms[remote_server.id] = remote_realms_for_server
# Get plan data for remote realms
for remote_realm in remote_realms[remote_server.id]: