Fix passign full user object instead of id to Event.create
This commit is contained in:
parent
6579ba3e77
commit
7d1b3d4e27
3 changed files with 2 additions and 3 deletions
|
@ -33,7 +33,7 @@ class ActivityObserver < BaseObserver
|
|||
target_id: record.id,
|
||||
target_type: record.class.name,
|
||||
action: status,
|
||||
author_id: current_user
|
||||
author_id: current_user.id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -46,7 +46,7 @@ class MergeRequestObserver < ActivityObserver
|
|||
target_id: record.id,
|
||||
target_type: record.class.name,
|
||||
action: status,
|
||||
author_id: current_user
|
||||
author_id: current_user.id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,6 @@ describe ActivityObserver do
|
|||
it { @event.project.should == project }
|
||||
end
|
||||
|
||||
|
||||
describe "Issue created" do
|
||||
before do
|
||||
Issue.observers.enable :activity_observer do
|
||||
|
|
Loading…
Reference in a new issue