use after_create instead of after_save
This commit is contained in:
parent
d23b1136ad
commit
4fc038fe1b
2 changed files with 2 additions and 2 deletions
|
@ -308,7 +308,7 @@ class Dossier < ApplicationRecord
|
|||
|
||||
after_save :send_dossier_received
|
||||
after_save :send_web_hook
|
||||
after_save_commit :send_draft_notification_email
|
||||
after_create_commit :send_draft_notification_email
|
||||
|
||||
validates :user, presence: true
|
||||
validates :individual, presence: true, if: -> { revision.procedure.for_individual? }
|
||||
|
|
|
@ -19,7 +19,7 @@ class Invite < ApplicationRecord
|
|||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
after_save_commit :send_notification
|
||||
after_create_commit :send_notification
|
||||
|
||||
validates :email, presence: true
|
||||
validates :email, uniqueness: { scope: :dossier_id }
|
||||
|
|
Loading…
Add table
Reference in a new issue