From 07e4b8d33d8ea2230da402165fe1f16aa4095c0e Mon Sep 17 00:00:00 2001 From: Charles Connell Date: Tue, 11 Mar 2014 13:20:42 -0400 Subject: [PATCH] Handle edge case --- .../apps/notes/management/commands/populate_filepicker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/karmaworld/apps/notes/management/commands/populate_filepicker.py b/karmaworld/apps/notes/management/commands/populate_filepicker.py index b8ecc8a..dcf556c 100644 --- a/karmaworld/apps/notes/management/commands/populate_filepicker.py +++ b/karmaworld/apps/notes/management/commands/populate_filepicker.py @@ -34,8 +34,11 @@ class Command(BaseCommand): print html_resp.text continue html = html_resp.text - else: + elif note.html: html = note.html + else: + print "Couldn't find any HTML for {0}".format(str(note)) + continue fp_policy_json = '{{"expiry": {0}, "call": ["pick","store","read","stat"]}}' fp_policy_json = fp_policy_json.format(int(time.time() + 31536000)) -- 2.25.1