mirror of https://github.com/Evolix/chexpire.git
Fixed the check form in error with specitic cironstances
This commit is contained in:
parent
ccde868457
commit
7d5c7de7fe
|
@ -116,7 +116,7 @@ class ChecksController < ApplicationController # rubocop:disable Metrics/ClassLe
|
|||
last_notification = @check.notifications.last
|
||||
|
||||
# user has filled a new notification: we use it for the form
|
||||
if last_notification.new_record?
|
||||
if last_notification.present? && last_notification.new_record?
|
||||
@new_notification = last_notification
|
||||
else # otherwise, set a new empty notification
|
||||
build_empty_notification
|
||||
|
|
Loading…
Reference in New Issue