From 1ae4383b56776c7324b3d91b484758d420f6fc8f Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 18 Apr 2019 10:17:37 -0500 Subject: [PATCH] more accounting for bad ombi output. Addresses #119 --- varken/ombi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/varken/ombi.py b/varken/ombi.py index 86f8e33..f82bc2f 100644 --- a/varken/ombi.py +++ b/varken/ombi.py @@ -102,13 +102,13 @@ class OmbiAPI(object): hash_id = hashit(f'{show.id}{show.tvDbId}{show.title}') # Denied = 0, Approved = 1, Completed = 2, Pending = 3 - if show.childRequests[0]['denied']: + if show.childRequests[0].get('denied'): status = 0 - elif show.childRequests[0]['approved'] and show.childRequests[0]['available']: + elif show.childRequests[0].get('approved') and show.childRequests[0].get('available'): status = 2 - elif show.childRequests[0]['approved']: + elif show.childRequests[0].get('approved'): status = 1 else: