if milestone id is zero don't get it from database (#7169)
This commit is contained in:
parent
d93e6232e8
commit
7162fbf3d6
|
@ -426,6 +426,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("GetMilestoneByID: %d: %v", milestoneID, err)
|
log.Error("GetMilestoneByID: %d: %v", milestoneID, err)
|
||||||
|
@ -433,6 +434,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