mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 15:31:47 +01:00
fix validations for daily pattern and fix disappearing target fields for recurring todos
This commit is contained in:
parent
38f0cf1b7a
commit
06ac3067d3
2 changed files with 9 additions and 16 deletions
|
|
@ -47,8 +47,7 @@ class RecurringTodo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def validate_daily
|
||||
errors.add_to_base("Please choose a recurrence setting") if daily_selector.nil? || daily_selector.blank?
|
||||
if (daily_selector == "daily_every_x_day") && (daily_every_x_days.nil? || daily_every_x_days.blank?)
|
||||
if (!only_work_days) && (daily_every_x_days.nil? || daily_every_x_days.blank?)
|
||||
errors.add_to_base("Every other nth day may not be empty for recurrence setting")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue