mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Fix the error when start_at or end_at is nil
This commit is contained in:
parent
476701c5df
commit
bb528b429b
1 changed files with 2 additions and 2 deletions
|
|
@ -2,8 +2,8 @@ class PointsController < ApplicationController
|
|||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
start_at = params[:start_at].to_datetime.to_i
|
||||
end_at = params[:end_at].to_datetime.to_i
|
||||
start_at = params[:start_at]&.to_datetime.to_i
|
||||
end_at = params[:end_at]&.to_datetime.to_i
|
||||
|
||||
@points =
|
||||
if start_at && end_at
|
||||
|
|
|
|||
Loading…
Reference in a new issue