mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Set NoAutoTime when updating is_archived (#12266)
Fix #12246 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		@@ -2072,7 +2072,7 @@ func CheckRepoStats(ctx context.Context) error {
 | 
				
			|||||||
// SetArchiveRepoState sets if a repo is archived
 | 
					// SetArchiveRepoState sets if a repo is archived
 | 
				
			||||||
func (repo *Repository) SetArchiveRepoState(isArchived bool) (err error) {
 | 
					func (repo *Repository) SetArchiveRepoState(isArchived bool) (err error) {
 | 
				
			||||||
	repo.IsArchived = isArchived
 | 
						repo.IsArchived = isArchived
 | 
				
			||||||
	_, err = x.Where("id = ?", repo.ID).Cols("is_archived").Update(repo)
 | 
						_, err = x.Where("id = ?", repo.ID).Cols("is_archived").NoAutoTime().Update(repo)
 | 
				
			||||||
	return
 | 
						return
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user