Defect #24308

Allow Journal to return empty Array instead nil in Journal#attachments

Added by Roman Shipiev 8 months ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Attachments
Target version:3.4.0
Resolution:Fixed Affected version:

Description

If we journalize objects without #attachments then take exception (TypeError: no implicit conversion of nil into Array) in app/helpers/application_helper.rb

  def parse_inline_attachments(text, project, obj, attr, only_path, options)
    ...
    attachments += obj.attachments if obj.respond_to?(:attachments)
    ...
  end

24308.patch Magnifier (423 Bytes) Roman Shipiev, 2016-11-09 14:55

Associated revisions

Revision 15957
Added by Jean-Philippe Lang 7 months ago

Allow Journal to return empty Array instead nil in Journal#attachments (#24308).

Patch by Roman Shipiev.

History

#1 Updated by Roman Shipiev 8 months ago

#2 Updated by Jean-Philippe Lang 7 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.4.0
  • Resolution set to Fixed

Patch committed, thanks.

Also available in: Atom PDF