diff options
author | Johan Lundberg <lundberg@nordu.net> | 2014-04-14 15:17:05 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2014-04-14 15:17:05 +0200 |
commit | 805350c85087fa9900daf0baeda330fc54321cbc (patch) | |
tree | 0fccbdc01aa8a5125a1ae6d7b801292850fecdea | |
parent | 44456d1fb54aad27cee0aa0ceb84dedf2529c42f (diff) |
"sco_element is not None" is future safe.
-rw-r--r-- | meetingtools/apps/content/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meetingtools/apps/content/models.py b/meetingtools/apps/content/models.py index 8f36833..a37e5fd 100644 --- a/meetingtools/apps/content/models.py +++ b/meetingtools/apps/content/models.py @@ -55,7 +55,7 @@ class Content(models.Model): byte_count = api.get_byte_count(sco_id) if byte_count or byte_count == 0: sco_element = api.get_sco_info(sco_id) - if sco_element and not sco_element.get('source-sco-id'): # Object is not a reference + if sco_element is not None and not sco_element.get('source-sco-id'): # Object is not a reference views = api.get_sco_views(sco_id) owner = api.get_owner(sco_element.findtext('url-path')) if not owner: |