diff --git a/pkg/models/list_create_update.go b/pkg/models/list_create_update.go index 75e90150d..c2c6f37d3 100644 --- a/pkg/models/list_create_update.go +++ b/pkg/models/list_create_update.go @@ -69,10 +69,10 @@ func CreateOrUpdateList(list *List) (err error) { // @Router /lists/{id} [post] func (l *List) Update() (err error) { // Check if it exists - if err = l.GetSimpleByID(); err != nil { + lorig := List{ID: l.ID} + if err = lorig.GetSimpleByID(); err != nil { return } - return CreateOrUpdateList(l) } diff --git a/pkg/models/list_rights.go b/pkg/models/list_rights.go index 772752137..7bc4f92f4 100644 --- a/pkg/models/list_rights.go +++ b/pkg/models/list_rights.go @@ -75,22 +75,12 @@ func (l *List) CanRead(a web.Auth) bool { // CanDelete checks if the user can delete a list func (l *List) CanDelete(a web.Auth) bool { doer := getUserForRights(a) - - if err := l.GetSimpleByID(); err != nil { - log.Log.Error("Error occurred during CanDelete for List: %s", err) - return false - } return l.IsAdmin(doer) } // CanUpdate checks if the user can update a list func (l *List) CanUpdate(a web.Auth) bool { doer := getUserForRights(a) - - if err := l.GetSimpleByID(); err != nil { - log.Log.Error("Error occurred during CanUpdate for List: %s", err) - return false - } return l.CanWrite(doer) }