diff --git a/zerver/models.py b/zerver/models.py index 0331778fcd..5868355cdb 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -399,7 +399,11 @@ class RealmEmoji(models.Model): unique_together = ("realm", "name") def __str__(self) -> Text: - return "" % (self.realm.string_id, self.name, self.file_name) + return "" % (self.realm.string_id, + self.id, + self.name, + self.deactivated, + self.file_name) def get_realm_emoji_uncached(realm: Realm) -> Dict[Text, Dict[str, Any]]: d = {} diff --git a/zerver/tests/test_realm_emoji.py b/zerver/tests/test_realm_emoji.py index 235e457d87..54f0a569a0 100644 --- a/zerver/tests/test_realm_emoji.py +++ b/zerver/tests/test_realm_emoji.py @@ -61,9 +61,10 @@ class RealmEmojiTest(ZulipTestCase): content["emoji"]['my_emoji']['author']['email'], email) realm_emoji = RealmEmoji.objects.get(name='my_emoji') + file_name = realm_emoji.name + '.png' self.assertEqual( str(realm_emoji), - '' + '' % (realm_emoji.id, file_name) ) def test_upload_exception(self) -> None: