1
0

fix: updating a list might remove its background

resolves #1039
This commit is contained in:
kolaente
2021-11-13 17:52:14 +01:00
parent 2ae1da473e
commit cf05de19b3
3 changed files with 106 additions and 89 deletions

View File

@ -75,7 +75,7 @@ func (ld *ListDuplicate) Create(s *xorm.Session, doer web.Auth) (err error) {
ld.List.Identifier = "" // Reset the identifier to trigger regenerating a new one
// Set the owner to the current user
ld.List.OwnerID = doer.GetID()
if err := CreateOrUpdateList(s, ld.List, doer); err != nil {
if err := CreateList(s, ld.List, doer); err != nil {
// If there is no available unique list identifier, just reset it.
if IsErrListIdentifierIsNotUnique(err) {
ld.List.Identifier = ""