diff options
author | Mark Chao <mchao@gitlab.com> | 2018-09-28 17:54:32 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-10-01 22:37:43 +0800 |
commit | f09303b00aa61825d2fed22aa04d8c6d1dace1b0 (patch) | |
tree | a2b02603fa479243bb45cf0821839d716ce1e0bb /lib | |
parent | 39d2f186a7cceb75ee0b18a9bb21447efb5d4262 (diff) | |
download | gitlab-ce-f09303b00aa61825d2fed22aa04d8c6d1dace1b0.tar.gz |
Fix MR discussion not loaded issue51958-fix-mr-discussion-loading
Display `formatter` as the sole content of `position` object.
This means `diff_file` data is not referenced, which is the
caseu of "IOError: not opened for reading".
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/diff/position.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb index fc280f96ec1..f967494199e 100644 --- a/lib/gitlab/diff/position.rb +++ b/lib/gitlab/diff/position.rb @@ -69,6 +69,10 @@ module Gitlab JSON.generate(formatter.to_h, opts) end + def as_json(opts = nil) + to_h.as_json(opts) + end + def type formatter.line_age end |