mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
home: Switch invalid pointer logging to by user ID.
This commit is contained in:
@@ -435,7 +435,7 @@ class HomeTest(ZulipTestCase):
|
||||
self.login(email)
|
||||
with patch('logging.warning') as mock:
|
||||
result = self._get_home_page()
|
||||
mock.assert_called_once_with('hamlet@zulip.com has invalid pointer 999999')
|
||||
mock.assert_called_once_with('User %s has invalid pointer 999999' % (user_profile.id,))
|
||||
self._sanity_check(result)
|
||||
|
||||
def test_topic_narrow(self) -> None:
|
||||
|
||||
@@ -160,7 +160,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
|
||||
latest_read = get_usermessage_by_message_id(user_profile, user_profile.pointer)
|
||||
if latest_read is None:
|
||||
# Don't completely fail if your saved pointer ID is invalid
|
||||
logging.warning("%s has invalid pointer %s" % (user_profile.email, user_profile.pointer))
|
||||
logging.warning("User %s has invalid pointer %s" % (user_profile.id, user_profile.pointer))
|
||||
|
||||
# We pick a language for the user as follows:
|
||||
# * First priority is the language in the URL, for debugging.
|
||||
|
||||
Reference in New Issue
Block a user