mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	[API] Load issue attributes when editing an issue (#6723)
This commit is contained in:
		
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							cbf8538635
						
					
				
				
					commit
					45fa5cc1be
				
			| @@ -291,6 +291,12 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { | ||||
| 	} | ||||
| 	issue.Repo = ctx.Repo.Repository | ||||
|  | ||||
| 	err = issue.LoadAttributes() | ||||
| 	if err != nil { | ||||
| 		ctx.Error(500, "LoadAttributes", err) | ||||
| 		return | ||||
| 	} | ||||
|  | ||||
| 	if !issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWrite(models.UnitTypeIssues) { | ||||
| 		ctx.Status(403) | ||||
| 		return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user