From edc31fae39e502c5829fa552a20be8d9eeb1f672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sun, 6 Jun 2021 12:14:01 +0000 Subject: [PATCH] Fix migration metric conditionals --- lease.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lease.py b/lease.py index ddd5053..2b32fe8 100755 --- a/lease.py +++ b/lease.py @@ -58,8 +58,8 @@ async def submit(request, q): }, return_document=ReturnDocument.BEFORE) if doc: submit_count.labels(form.service.data).inc() - if doc["instance"] != "instance": - migration_count.labels(const.FQDN).inc() + if doc.get("instance") != instance: + migration_count.labels(FQDN).inc() return response.text('Client lease info updated') else: not_found_count.labels(form.service.data).inc()