summaryrefslogtreecommitdiffstats
path: root/app/models/time_entry.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/time_entry.rb')
-rw-r--r--app/models/time_entry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index 4f2c561f5..984c2c3a0 100644
--- a/app/models/time_entry.rb
+++ b/app/models/time_entry.rb
@@ -17,7 +17,7 @@ class TimeEntry < ActiveRecord::Base
end
def validate
- errors.add :hours, :activerecord_error_invalid if hours && hours < 0
+ errors.add :hours, :activerecord_error_invalid if hours && (hours < 0 || hours >= 1000)
errors.add :project_id, :activerecord_error_invalid if project.nil?
errors.add :issue_id, :activerecord_error_invalid if (issue_id && !issue) || (issue && project!=issue.project)
end