mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 21:46:24 +02:00
Merge pull request #2698 from internetee/130-poll-message-crash--revised
Fix poll messages crashing
This commit is contained in:
commit
97708f2476
3 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,7 @@ module Repp
|
|||
# WHERE attached_obj_type = 'Epp::Domain' AND name IS NULL;
|
||||
message = 'orphan message, domain deleted, registrar should dequeue: '
|
||||
Rails.logger.error message + e.to_s
|
||||
nil
|
||||
end
|
||||
# rubocop:enable Style/RescueStandardError
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ class Action < ApplicationRecord
|
|||
|
||||
belongs_to :user
|
||||
belongs_to :contact, optional: true
|
||||
has_many :notifications, dependent: :nullify
|
||||
has_many :subactions, class_name: 'Action',
|
||||
foreign_key: 'bulk_action_id',
|
||||
inverse_of: :bulk_action,
|
||||
|
|
|
@ -13,6 +13,7 @@ class Notification < ApplicationRecord
|
|||
|
||||
def mark_as_read
|
||||
raise 'Read notification cannot be marked as read again' if read?
|
||||
|
||||
self.read = true
|
||||
save
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue