From d0060f6d2c8d89ee366a94f0ce180c96433ce842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Thu, 7 May 2026 17:30:09 +0400 Subject: [PATCH] Fix geoloc ip country block imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- pkg/geoloc/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/geoloc/service.go b/pkg/geoloc/service.go index 132abcfe0..da766708a 100644 --- a/pkg/geoloc/service.go +++ b/pkg/geoloc/service.go @@ -101,7 +101,11 @@ func (s *Service) ImportFromDir(ctx context.Context, dataDir string) error { if err := s.pgClient.WithTx( ctx, func(ctx context.Context, tx pg.Tx) error { - return fmt.Errorf("cannot swap staging table: %w", err) + if err := coredata.SwapIPCountryBlocksStaging(ctx, tx); err != nil { + return fmt.Errorf("cannot swap staging table: %w", err) + } + + return nil }, ); err != nil { return err