mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-02 23:24:12 +08:00
if milestone id is zero don't get it from database (#7174)
This commit is contained in:
parent
5e97b2d00e
commit
10effb396a
|
@ -406,6 +406,7 @@ func NewIssue(ctx *context.Context) {
|
||||||
ctx.Data["BodyQuery"] = body
|
ctx.Data["BodyQuery"] = body
|
||||||
|
|
||||||
milestoneID := ctx.QueryInt64("milestone")
|
milestoneID := ctx.QueryInt64("milestone")
|
||||||
|
if milestoneID > 0 {
|
||||||
milestone, err := models.GetMilestoneByID(milestoneID)
|
milestone, err := models.GetMilestoneByID(milestoneID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(4, "GetMilestoneByID: %d: %v", milestoneID, err)
|
log.Error(4, "GetMilestoneByID: %d: %v", milestoneID, err)
|
||||||
|
@ -413,6 +414,7 @@ func NewIssue(ctx *context.Context) {
|
||||||
ctx.Data["milestone_id"] = milestoneID
|
ctx.Data["milestone_id"] = milestoneID
|
||||||
ctx.Data["Milestone"] = milestone
|
ctx.Data["Milestone"] = milestone
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setTemplateIfExists(ctx, issueTemplateKey, IssueTemplateCandidates)
|
setTemplateIfExists(ctx, issueTemplateKey, IssueTemplateCandidates)
|
||||||
renderAttachmentSettings(ctx)
|
renderAttachmentSettings(ctx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user