mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
remote_realm: Add syncing of org_type.
This commit is contained in:
committed by
Tim Abbott
parent
e276812e42
commit
02d5740f0f
@@ -12,7 +12,7 @@ from typing_extensions import override
|
||||
from analytics.models import BaseCount
|
||||
from zerver.lib.rate_limiter import RateLimitedObject
|
||||
from zerver.lib.rate_limiter import rules as rate_limiter_rules
|
||||
from zerver.models import AbstractPushDeviceToken, AbstractRealmAuditLog
|
||||
from zerver.models import AbstractPushDeviceToken, AbstractRealmAuditLog, Realm
|
||||
|
||||
|
||||
def get_remote_server_by_uuid(uuid: str) -> "RemoteZulipServer":
|
||||
@@ -104,6 +104,11 @@ class RemoteRealm(models.Model):
|
||||
# Value obtained's from the remote server's realm.host.
|
||||
host = models.TextField()
|
||||
|
||||
org_type = models.PositiveSmallIntegerField(
|
||||
default=Realm.ORG_TYPES["unspecified"]["id"],
|
||||
choices=[(t["id"], t["name"]) for t in Realm.ORG_TYPES.values()],
|
||||
)
|
||||
|
||||
# The fields below are analogical to RemoteZulipServer fields.
|
||||
|
||||
last_updated = models.DateTimeField("last updated", auto_now=True)
|
||||
|
Reference in New Issue
Block a user