Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

claim_attachment: Remove the stale 'user_profile' parameter.

Prakhar Pratyush508c5611d100
diff --git a/zerver/actions/uploads.py b/zerver/actions/uploads.py
index e776d263fbb..58419ac3d4f 100644
--- a/zerver/actions/uploads.py
+++ b/zerver/actions/uploads.py
@@ -53,7 +53,7 @@ def do_claim_attachments(
claimed = True
attachment = claim_attachment(
- user_profile, path_id, message, is_message_realm_public, is_message_web_public
+ path_id, message, is_message_realm_public, is_message_web_public
)
if not isinstance(message, ScheduledMessage):
# attachment update events don't say anything about scheduled messages,
diff --git a/zerver/lib/upload/__init__.py b/zerver/lib/upload/__init__.py
index 309949df207..d41f85fde9f 100644
--- a/zerver/lib/upload/__init__.py
+++ b/zerver/lib/upload/__init__.py
@@ -85,7 +85,6 @@ def upload_message_attachment(
def claim_attachment(
- user_profile: UserProfile,
path_id: str,
message: Union[Message, ScheduledMessage],
is_message_realm_public: bool,
diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.py
index edf2fd6a35a..701c926d90c 100644
--- a/zerver/tests/test_import_export.py
+++ b/zerver/tests/test_import_export.py
@@ -168,7 +168,6 @@ class ExportFile(ZulipTestCase):
)
attachment_path_id = url.replace("/user_uploads/", "")
claim_attachment(
- user_profile=user_profile,
path_id=attachment_path_id,
message=message,
is_message_realm_public=True,
@@ -388,7 +387,6 @@ class RealmImportExportTest(ExportFile):
)
attachment_path_id = url.replace("/user_uploads/", "")
attachment = claim_attachment(
- user_profile=user_profile,
path_id=attachment_path_id,
message=Message.objects.get(id=personal_message_id),
is_message_realm_public=True,