Error 500 when creating merge requests
When we try to create merge requests for a project, error 500 is thrown. We are running GitLab 8.2.2 omnibus package on Debian 7.
The issue is also visible in production.log:
Completed 500 Internal Server Error in 9376ms (ActiveRecord: 38.5ms)
ActionView::Template::Error (undefined method `mime_type' for nil:NilClass):
11: %span.wrap
12: .frame.deleted
13: %a{href: namespace_project_blob_path(@project.namespace, @project, tree_join(@commit.parent_id, diff.old_path))}
14: %img{src: "data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
15: %p.image-info.hide
16: %span.meta-filesize= "#{number_to_human_size old_file.size}"
17: |
app/views/projects/diffs/_image.html.haml:14:in `_app_views_projects_diffs__image_html_haml___3277172520752332982_49665140'
app/views/projects/diffs/_file.html.haml:42:in `_app_views_projects_diffs__file_html_haml___4432573599310294193_49810020'
app/views/projects/diffs/_diffs.html.haml:22:in `block in _app_views_projects_diffs__diffs_html_haml__1535089848600712864_34883100'
app/views/projects/diffs/_diffs.html.haml:17:in `each'
app/views/projects/diffs/_diffs.html.haml:17:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:17:in `_app_views_projects_diffs__diffs_html_haml__1535089848600712864_34883100'
app/views/projects/merge_requests/_new_submit.html.haml:37:in `_app_views_projects_merge_requests__new_submit_html_haml___1332047566409503028_56668280'
app/views/projects/merge_requests/new.html.haml:5:in `_app_views_projects_merge_requests_new_html_haml___3144171230923591329_56894100'