mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
TimeEntry acts_as_activity_provider scope should joins(:project) (#18818).
Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@13971 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f7cfaf06ad
commit
4bbd3d81fd
@ -35,7 +35,7 @@ class TimeEntry < ActiveRecord::Base
|
||||
|
||||
acts_as_activity_provider :timestamp => "#{table_name}.created_on",
|
||||
:author_key => :user_id,
|
||||
:scope => preload(:project)
|
||||
:scope => joins(:project).preload(:project)
|
||||
|
||||
validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on
|
||||
validates_numericality_of :hours, :allow_nil => true, :message => :invalid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user