Project

General

Profile

Actions

Defect #24308

closed

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

Added by Roman Shipiev over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Attachments
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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

Files

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

Updated by Roman Shipiev over 7 years ago

Actions #2

Updated by Jean-Philippe Lang over 7 years 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.

Actions

Also available in: Atom PDF