Validate done/weekly combination only on creation of task.
This commit is contained in:
parent
577945e591
commit
d081a2c66b
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Task < ActiveRecord::Base
|
|||
validates :required_users, :presence => true
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 0
|
||||
validates_length_of :description, maximum: 250
|
||||
validates :done, exclusion: { in: [true], message: 'erledigte Aufgaben können nicht wöchentlich wiederholt werden' }, if: :periodic?
|
||||
validates :done, exclusion: { in: [true], message: 'erledigte Aufgaben können nicht wöchentlich wiederholt werden' }, if: :periodic?, on: :create
|
||||
|
||||
before_save :exclude_from_periodic_task_group
|
||||
after_save :update_ordergroup_stats
|
||||
|
|
Loading…
Reference in a new issue