mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 08:18:50 +01:00
handle nil correctly in last patch
This commit is contained in:
parent
065f543a83
commit
b076ae46f8
1 changed files with 5 additions and 1 deletions
|
|
@ -170,7 +170,11 @@ class ApplicationController < ActionController::Base
|
|||
todo.due = rt.get_due_date(date)
|
||||
# make sure that show_from is not in the past
|
||||
show_from_date = rt.get_show_from_date(date)
|
||||
todo.show_from = show_from_date < Time.now.utc ? nil : show_from_date
|
||||
if show_from_date.nil?
|
||||
todo.show_from=nil
|
||||
else
|
||||
todo.show_from = show_from_date < Time.now.utc ? nil : show_from_date
|
||||
end
|
||||
|
||||
saved = todo.save
|
||||
if saved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue