fixes for failed cron maintenance tasks
* update rails scripts for 5.2 * system dmails should be scoped to system * fix broken url generator in forum notices
This commit is contained in:
@@ -110,9 +110,11 @@ class Dmail < ApplicationRecord
|
||||
end
|
||||
|
||||
def create_automated(params)
|
||||
dmail = Dmail.new(from: User.system, **params)
|
||||
dmail.owner = dmail.to
|
||||
dmail.save
|
||||
CurrentUser.as_system do
|
||||
dmail = Dmail.new(from: User.system, **params)
|
||||
dmail.owner = dmail.to
|
||||
dmail.save
|
||||
end
|
||||
dmail
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user