Nested folders: Write to folders table even if the feature toggle is off (#77788)

* Update folders table even if the feature toggle is off

* Fix failing test

* Apply review feedback

* Revert test changes
This commit is contained in:
Tania
2023-11-10 13:03:00 +01:00
committed by GitHub
parent cb711660f1
commit 6b4337a842
3 changed files with 42 additions and 41 deletions

View File

@ -140,7 +140,7 @@ func (ss *sqlStore) Update(ctx context.Context, cmd folder.UpdateFolderCommand)
return folder.ErrInternal.Errorf("failed to get affected row: %w", err)
}
if affected == 0 {
return folder.ErrInternal.Errorf("no folders are updated")
return folder.ErrInternal.Errorf("no folders are updated: %w", folder.ErrFolderNotFound)
}
foldr, err = ss.Get(ctx, folder.GetFolderQuery{