Skip to content

Commit

Permalink
quote deploy bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kagrawal2 committed Dec 29, 2016
1 parent f6a074e commit 286e3b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/quoteManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ def get_quote(self, lang='en', key=None):

# Decoding JSON and fill Quote, if HTTP responce is OK
# try:
print('data was received')
retrieved_data = json.loads(response.read().decode('utf-8'))
print(retrieved_data)
return Quote(data=retrieved_data)
# except:
# return None
Expand Down
8 changes: 2 additions & 6 deletions app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,9 @@ def suggestQuote(title, description, count=0):
"""
Using a quotes database, relationship between title, description : quote and author
"""
print(f)

quote = f.get_quote()
print('here')
if quote is not None:
print('quote found')
if len(quote.quote + quote.author) < 201:
print('returning quote')
if quote is not None and len(quote.quote + quote.author) < 201:
return { 'q' : quote.quote, 'author' : quote.author }
else:
if count < 4:
Expand Down

0 comments on commit 286e3b2

Please sign in to comment.