Fix no rows in result set error in emoji list command (#3152)

Co-authored-by: Romain de Laage <romain.delaage@rdelaage.ovh>
This commit is contained in:
rdelaage
2024-07-30 19:12:06 +02:00
committed by GitHub
parent 0b4a951b48
commit 26022c2733

View File

@@ -83,7 +83,7 @@ func (l *list) GetAllEmojisPaths(ctx context.Context, filter func(*gtsmodel.Emoj
for {
// Get the next page of emoji media up to max ID.
attachments, err := l.dbService.GetEmojis(ctx, &l.page)
if err != nil {
if err != nil && !errors.Is(err, db.ErrNoEntries) {
return nil, fmt.Errorf("failed to retrieve media metadata from database: %w", err)
}