π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[server] Handle case when no entry exists in trash
Neeraj Gupta4ecc64e478e1
diff --git a/server/pkg/repo/trash.go b/server/pkg/repo/trash.goindex 5218caf55d..1c6ab6b45f 100644--- a/server/pkg/repo/trash.go+++ b/server/pkg/repo/trash.go@@ -423,7 +423,7 @@ func (t *TrashRepository) EmptyTrash(ctx context.Context, userID int64, lastUpda}func (t *TrashRepository) GetTrashUpdatedAt(userID int64) (int64, error) {- row := t.DB.QueryRow(`SELECT max(updated_at) FROM trash WHERE user_id = $1`, userID)+ row := t.DB.QueryRow(`SELECT coalesce(max(updated_at),0) FROM trash WHERE user_id = $1`, userID)var updatedAt int64err := row.Scan(&updatedAt)if errors.Is(err, sql.ErrNoRows) {