don't send notification when UsersProject destroyed
This commit is contained in:
parent
ed4fbcf6b0
commit
85db51f660
|
@ -1,5 +1,6 @@
|
||||||
class UsersProjectObserver < ActiveRecord::Observer
|
class UsersProjectObserver < ActiveRecord::Observer
|
||||||
def after_commit(users_project)
|
def after_commit(users_project)
|
||||||
|
return if users_project.destroyed?
|
||||||
Notify.project_access_granted_email(users_project.id).deliver
|
Notify.project_access_granted_email(users_project.id).deliver
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue