lib/provider/comment.rb in ticketmaster-lighthouse-0.5.1 vs lib/provider/comment.rb in ticketmaster-lighthouse-0.5.2
- old
+ new
@@ -26,11 +26,11 @@
#
def self.find_by_attributes(project_id, ticket_id, attributes = {})
result = self.search(project_id, ticket_id, attributes)
result[0].shift
result[0].collect do |comment|
- self.new(result[1], index_of(result[1].versions, comment))
- end
+ self.new(result[1], index_of(result[1].versions, comment)) if !comment.body.blank?
+ end.compact
end
# The Array#index method doesn't work for the versions...
# because it seems they're all equal.
def self.index_of(versions, needle)