From 5ded1af057c3558e62a216d048af233478159ddb Mon Sep 17 00:00:00 2001 From: Konst Date: Tue, 10 Sep 2024 17:13:19 +0300 Subject: [PATCH] Fix err returning --- internal/storage/postgres/core.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/storage/postgres/core.go b/internal/storage/postgres/core.go index 4aab566..f63a6da 100644 --- a/internal/storage/postgres/core.go +++ b/internal/storage/postgres/core.go @@ -174,7 +174,10 @@ func setTokenMetadataLastUpdateID(ctx context.Context, conn *database.Bun) error models.SetLastUpdateID(0) return nil } + if err != nil { + return err + } models.SetLastUpdateID(tokenMetadata.UpdateID) - return err + return nil }