From c8ff0404406c5939d187b737003d8e02e5d2ab8b Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Sun, 14 Jan 2018 21:55:39 +0100
Subject: [PATCH] Fix ithenticate package response 2

---
 submissions/forms.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/submissions/forms.py b/submissions/forms.py
index fc341b973..48d8037d4 100644
--- a/submissions/forms.py
+++ b/submissions/forms.py
@@ -818,7 +818,7 @@ class iThenticateReportForm(forms.ModelForm):
         client = self.client
         response = client.documents.get(self.document_id)
         if response['status'] == 200:
-            return response.get('data')[0]
+            return response.get('data')[0].get('documents')[0]
         self.add_error(None, "Updating failed. iThenticate didn't return valid data [1]")
 
         for msg in client.messages:
-- 
GitLab