mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
models: Use UPGRADE_TEXT_STANDARD in ensure_not_on_limited_plan.
This commit is contained in:
parent
4e0d8953b4
commit
a699f39050
@ -494,7 +494,7 @@ class Realm(models.Model):
|
||||
|
||||
def ensure_not_on_limited_plan(self) -> None:
|
||||
if self.plan_type == Realm.LIMITED:
|
||||
raise JsonableError(_("Feature unavailable on your current plan."))
|
||||
raise JsonableError(self.UPGRADE_TEXT_STANDARD)
|
||||
|
||||
@property
|
||||
def subdomain(self) -> str:
|
||||
|
||||
@ -709,7 +709,7 @@ class RealmTest(ZulipTestCase):
|
||||
req = dict(message_retention_days=ujson.dumps(10))
|
||||
result = self.client_patch('/json/realm', req)
|
||||
self.assert_json_error(
|
||||
result, "Feature unavailable on your current plan.")
|
||||
result, "Available on Zulip Standard. Upgrade to access.")
|
||||
|
||||
|
||||
class RealmAPITest(ZulipTestCase):
|
||||
|
||||
@ -1371,7 +1371,7 @@ class RealmLogoTest(UploadSerializeMixin, ZulipTestCase):
|
||||
self.login_user(user_profile)
|
||||
with get_test_image_file(self.correct_files[0][0]) as fp:
|
||||
result = self.client_post("/json/realm/logo", {'file': fp, 'night': ujson.dumps(self.night)})
|
||||
self.assert_json_error(result, 'Feature unavailable on your current plan.')
|
||||
self.assert_json_error(result, 'Available on Zulip Standard. Upgrade to access.')
|
||||
|
||||
def test_get_default_logo(self) -> None:
|
||||
self.login('hamlet')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user