Don't filter params and merge them back in later

By building the issue before filtering
This commit is contained in:
Bob Van Landuyt 2017-03-08 01:20:05 +01:00
parent 5eee47758c
commit 843092b631

View file

@ -4,16 +4,11 @@ module Issues
include ResolveDiscussions
def execute
@issue = BuildService.new(project, current_user, params).execute
filter_spam_check_params
filter_resolve_discussion_params
issue_attributes = params.merge(
merge_request_for_resolving_discussions: merge_request_for_resolving_discussions_iid,
discussion_to_resolve: discussion_to_resolve_id
)
@issue = BuildService.new(project, current_user, issue_attributes).execute
create(@issue)
end