Give an article's clone its own uuid. This fixes a bug resulting in an infinite loop of writing stuff to a file.

This commit is contained in:
Jason Streifling 2025-02-03 10:44:06 +01:00
parent 9b4a8e1890
commit 951949f98d

View File

@ -901,6 +901,7 @@ func AllowEditArticle(c *b.Config, db *b.DB, s map[string]*Session) http.Handler
} }
newArticle := *oldArticle newArticle := *oldArticle
newArticle.UUID = uuid.New()
newArticle.Published = false newArticle.Published = false
newArticle.Rejected = true newArticle.Rejected = true
newArticle.EditedID = oldArticle.ID newArticle.EditedID = oldArticle.ID