From 4409b7bd2766640f4062490473cd4854c7303f63 Mon Sep 17 00:00:00 2001 From: Daniel Yohan Date: Tue, 8 Oct 2019 09:15:53 -0300 Subject: [PATCH] Update Check URL --- bothub/api/v2/nlp/views.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bothub/api/v2/nlp/views.py b/bothub/api/v2/nlp/views.py index fc4fa9ce..925d7d31 100644 --- a/bothub/api/v2/nlp/views.py +++ b/bothub/api/v2/nlp/views.py @@ -425,18 +425,14 @@ def retrieve(self, request, *args, **kwargs): try: validator(str(update.bot_data)) - url_valid = True - except ValidationError: - url_valid = False - - if url_valid: try: download = requests.get(update.bot_data) bot_data = base64.b64encode(download.content) except Exception: bot_data = b"" - else: + except ValidationError: bot_data = update.bot_data + return Response( { "update_id": update.id,