500 Error on 2nd "Cancel" button on Commit edit page
Created by: ddagunts
Hi,
First off I apologize if I'm wasting everyone's time with this because I'm not an experienced developer.
There seems to be a minor bug in v5.2: go to a project, then files, click any file and click edit. This will bring up the "edit commit" page (as I understand it). There are two "cancel" buttons, one on top of the page, one on the bottom. The upper one works fine, but the lower gives a consistent 500 error. I fixed locally with:
git@gitlab ~]$ diff gitlab/app/views/edit_tree/show.html.haml gitlab/app/views/edit_tree/show.html.haml.bak
30c30
< = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
---
> = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
[git@gitlab ~]$
Is this 1) an appropriate fix? and 2) I didn't do anything wrong with this change did I?
Thanks,
- Dmitry