mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
import: Fix check for whether data-user-id is present.
Apparently, the `in` keyword in Beautiful Soup does something different.
This commit is contained in:
@@ -249,7 +249,7 @@ def fix_message_rendered_content(realm: Realm,
|
|||||||
if len(user_mentions) != 0:
|
if len(user_mentions) != 0:
|
||||||
user_id_map = ID_MAP["user_profile"]
|
user_id_map = ID_MAP["user_profile"]
|
||||||
for mention in user_mentions:
|
for mention in user_mentions:
|
||||||
if 'data-user-id' not in mention:
|
if not mention.has_attr("data-user-id"):
|
||||||
# Legacy mentions don't have a data-user-id
|
# Legacy mentions don't have a data-user-id
|
||||||
# field; we should just import them
|
# field; we should just import them
|
||||||
# unmodified.
|
# unmodified.
|
||||||
|
|||||||
Reference in New Issue
Block a user