Skip to content

Commit 83327e0

Browse files
GiteaBotwxiaoguang
andauthored
Fix incorrect tree path value for patch editor (#29377) (#29421)
Backport #29377 by wxiaoguang Regression of #18718. When submitting the form, EditRepoFileForm.TreePath is marked as "Required", so the value can't be empty. The value is not used by backend, so use a meaningful dummy value for it. Co-authored-by: wxiaoguang <[email protected]>
1 parent 78cb09d commit 83327e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/repo/editor/patch.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<div class="breadcrumb-divider">:</div>
1515
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
1616
<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
17-
<input type="hidden" id="tree_path" name="tree_path" value="" required>
18-
<input id="file-name" maxlength="500" type="hidden" value="diff.patch">
17+
<input type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__">
18+
<input id="file-name" type="hidden" value="diff.patch">
1919
</div>
2020
</div>
2121
<div class="field">

0 commit comments

Comments
 (0)