Skip to content
Snippets Groups Projects
Commit cd29a13e authored by euko's avatar euko :palm_tree: Committed by euko
Browse files

Remove the default value for requesting_user_id

`requesting_user_id` was an argument added in 16.9 with
a default value to make the worker compatible backward.
parent 1f52aef9
1 merge request!146832Remove default value for requesting_user_id argument
......@@ -15,9 +15,7 @@ class UnassignIssuablesWorker
idempotent!
# Remove the default value `nil` for `requesting_user_id` after 16.10.
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/442878
def perform(user_id, entity_id, entity_type, requesting_user_id = nil)
def perform(user_id, entity_id, entity_type, requesting_user_id)
unless ENTITY_TYPES.include?(entity_type)
logger.error(
message: "#{entity_type} is not a supported entity.",
......@@ -42,9 +40,7 @@ def perform(user_id, entity_id, entity_type, requesting_user_id = nil)
return
end
# Remove the condition requesting_user_id after 16.10.
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/442878
requesting_user = requesting_user_id && User.find(requesting_user_id)
requesting_user = User.find(requesting_user_id)
user = User.find(user_id)
entity = entity_type.constantize.find(entity_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment