Fix migration metric conditionals

This commit is contained in:
Lauri Võsandi 2021-06-06 12:14:01 +00:00
parent caa3a41099
commit edc31fae39

View File

@ -58,8 +58,8 @@ async def submit(request, q):
}, return_document=ReturnDocument.BEFORE) }, return_document=ReturnDocument.BEFORE)
if doc: if doc:
submit_count.labels(form.service.data).inc() submit_count.labels(form.service.data).inc()
if doc["instance"] != "instance": if doc.get("instance") != instance:
migration_count.labels(const.FQDN).inc() migration_count.labels(FQDN).inc()
return response.text('Client lease info updated') return response.text('Client lease info updated')
else: else:
not_found_count.labels(form.service.data).inc() not_found_count.labels(form.service.data).inc()