Replac updated_at variable with heartbeated_at
Replace updated_at variable with heartbeated_at to avoid exception
in case of 'None' updated_at.
Partial-fixes: PROD-33592
Change-Id: I85e47135365f4b30276e683acee82812effc47ae
diff --git a/_modules/designatev2/services.py b/_modules/designatev2/services.py
index d18b156..6375812 100644
--- a/_modules/designatev2/services.py
+++ b/_modules/designatev2/services.py
@@ -25,8 +25,8 @@
service_list.append(s['service_name'])
for s in services:
- updated_at = datetime.datetime.strptime(s['updated_at'], '%Y-%m-%dT%H:%M:%S.%f')
- time_diff = abs((time_actual - updated_at).total_seconds()) <= time_delta
+ heartbeated_at = datetime.datetime.strptime(s['heartbeated_at'], '%Y-%m-%dT%H:%M:%S.%f')
+ time_diff = abs((time_actual - heartbeated_at).total_seconds()) <= time_delta
service_name = s['service_name']
if s['hostname'] == host and time_diff: