Improved error handling.
This commit is contained in:
parent
6583d3beca
commit
b7f5c4f705
1 changed files with 2 additions and 1 deletions
|
@ -138,6 +138,7 @@ returns
|
||||||
tickets = Ticket.where(created_by_id: user_id, create_article_type_id: type.id, create_article_sender_id: sender.id).limit(5).order(id: :desc)
|
tickets = Ticket.where(created_by_id: user_id, create_article_type_id: type.id, create_article_sender_id: sender.id).limit(5).order(id: :desc)
|
||||||
tickets.each {|ticket|
|
tickets.each {|ticket|
|
||||||
article = ticket.articles.first
|
article = ticket.articles.first
|
||||||
|
next if !article
|
||||||
article_bodies.push article.body
|
article_bodies.push article.body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +159,7 @@ returns
|
||||||
|
|
||||||
def self.rebuild_all_user
|
def self.rebuild_all_user
|
||||||
|
|
||||||
User.select('id').where(active: true).each {|local_user|
|
User.select('id').where(active: true).order(id: :desc).each {|local_user|
|
||||||
rebuild_user(local_user.id)
|
rebuild_user(local_user.id)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in a new issue