BigW Consortium Gitlab

Commit 43da8db7 by Bob Van Landuyt

Clean up `discussions_to_resolve`-method

parent 3eeea426
......@@ -16,15 +16,15 @@ module Issues
def discussions_to_resolve
return [] unless merge_request_for_resolving_discussions
@discussions_to_resolve ||= begin
if discussion_to_resolve_id
Array(merge_request_for_resolving_discussions.
find_diff_discussion(discussion_to_resolve_id))
else
merge_request_for_resolving_discussions
.resolvable_discussions
end
end
@discussions_to_resolve ||=
if discussion_to_resolve_id
discussion_or_nil = merge_request_for_resolving_discussions
.find_diff_discussion(discussion_to_resolve_id)
Array(discussion_or_nil)
else
merge_request_for_resolving_discussions
.resolvable_discussions
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment