|
|
|
@ -255,12 +255,14 @@ def get_asset_batch(location_tags: List[str], nr_location_tags: List[str],
|
|
|
|
response.raise_for_status() # Raises an HTTPError for bad responses
|
|
|
|
response.raise_for_status() # Raises an HTTPError for bad responses
|
|
|
|
data = response.json()
|
|
|
|
data = response.json()
|
|
|
|
reliabiility_data = data.get("data", [])
|
|
|
|
reliabiility_data = data.get("data", [])
|
|
|
|
|
|
|
|
|
|
|
|
print(reliabiility_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for item in reliabiility_data:
|
|
|
|
for item in reliabiility_data:
|
|
|
|
location_tag = item["location_tag"]
|
|
|
|
location_tag = item.get("location_tag", None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not location_tag:
|
|
|
|
|
|
|
|
print("Error processing item" + str(item))
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
is_nr = item["distribution"] != "NHPP"
|
|
|
|
is_nr = item["distribution"] != "NHPP"
|
|
|
|
mtbf = item["mtbf"]
|
|
|
|
mtbf = item["mtbf"]
|
|
|
|
|