models: Use UPGRADE_TEXT_STANDARD in ensure_not_on_limited_plan.

This commit is contained in:
Vishnu KS 2020-05-19 12:45:47 +00:00 committed by Tim Abbott
parent 4e0d8953b4
commit a699f39050
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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):

View File

@ -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')