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:
Tim Abbott 2019-06-18 11:13:32 -07:00
parent 649e363ee3
commit fd25ced43c
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ def fix_message_rendered_content(realm: Realm,
if len(user_mentions) != 0:
user_id_map = ID_MAP["user_profile"]
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
# field; we should just import them
# unmodified.