mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-18 05:08:09 +01:00
fix #895 by clearing the repeat pattern from todos before the pattern is deleted
cherry-picked from 1.7branch
This commit is contained in:
parent
87bb15460e
commit
bf15175c7b
2 changed files with 12 additions and 0 deletions
|
|
@ -717,6 +717,15 @@ class RecurringTodo < ActiveRecord::Base
|
|||
self.save
|
||||
end
|
||||
|
||||
def clear_todos_association
|
||||
unless todos.nil?
|
||||
self.todos.each do |t|
|
||||
t.recurring_todo = nil
|
||||
t.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def inc_occurences
|
||||
self.occurences_count += 1
|
||||
self.save
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue