File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,12 @@ func NewReleasePost(ctx *context.Context) {
361
361
return
362
362
}
363
363
364
+ // Title of release cannot be empty
365
+ if len (form .TagOnly ) == 0 && len (form .Title ) == 0 {
366
+ ctx .RenderWithErr (ctx .Tr ("repo.release.title_empty" ), tplReleaseNew , & form )
367
+ return
368
+ }
369
+
364
370
var attachmentUUIDs []string
365
371
if setting .Attachment .Enabled {
366
372
attachmentUUIDs = form .Files
@@ -408,12 +414,6 @@ func NewReleasePost(ctx *context.Context) {
408
414
return
409
415
}
410
416
411
- // Title of release cannot be empty
412
- if len (form .Title ) == 0 {
413
- ctx .RenderWithErr (ctx .Tr ("repo.release.title_empty" ), tplReleaseNew , & form )
414
- return
415
- }
416
-
417
417
rel = & repo_model.Release {
418
418
RepoID : ctx .Repo .Repository .ID ,
419
419
Repo : ctx .Repo .Repository ,
You can’t perform that action at this time.
0 commit comments