From e234385802950dd55c8e4c0761197bab43bb61c3 Mon Sep 17 00:00:00 2001 From: lagertonne Date: Thu, 26 Dec 2024 20:40:25 +0100 Subject: [PATCH] metrics: Fix bug when running migrate on empty db --- core/core/metrics.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/core/metrics.py b/core/core/metrics.py index 149829c..4964968 100644 --- a/core/core/metrics.py +++ b/core/core/metrics.py @@ -32,4 +32,7 @@ class ItemCountCollector(object): yield counter -REGISTRY.register(ItemCountCollector()) \ No newline at end of file +try: + REGISTRY.register(ItemCountCollector()) +except Exception as e: + print(e)