More EE->CE fixes
This commit is contained in:
parent
ef0df760fc
commit
50c1a989cc
5 changed files with 3 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
module TodosActions
|
module TodosActions
|
||||||
include Gitlab::Utils::StrongMemoize
|
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Projects::TodosController < Projects::ApplicationController
|
class Projects::TodosController < Projects::ApplicationController
|
||||||
|
include Gitlab::Utils::StrongMemoize
|
||||||
include TodosActions
|
include TodosActions
|
||||||
|
|
||||||
before_action :authenticate_user!, only: [:create]
|
before_action :authenticate_user!, only: [:create]
|
||||||
|
|
|
@ -169,9 +169,7 @@ module TodosHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def todo_group_options
|
def todo_group_options
|
||||||
groups = current_user.authorized_groups
|
groups = current_user.authorized_groups.map do |group|
|
||||||
|
|
||||||
groups = groups.map do |group|
|
|
||||||
{ id: group.id, text: group.full_name }
|
{ id: group.id, text: group.full_name }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class Todo < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def parent
|
def parent
|
||||||
project || group
|
project
|
||||||
end
|
end
|
||||||
|
|
||||||
def unmergeable?
|
def unmergeable?
|
||||||
|
|
|
@ -285,7 +285,6 @@ class TodoService
|
||||||
def attributes_for_target(target)
|
def attributes_for_target(target)
|
||||||
attributes = {
|
attributes = {
|
||||||
project_id: target&.project&.id,
|
project_id: target&.project&.id,
|
||||||
group_id: target.respond_to?(:group) ? target.group_id : nil,
|
|
||||||
target_id: target.id,
|
target_id: target.id,
|
||||||
target_type: target.class.name,
|
target_type: target.class.name,
|
||||||
commit_id: nil
|
commit_id: nil
|
||||||
|
|
Loading…
Reference in a new issue