summaryrefslogtreecommitdiff
path: root/meetingtools
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2014-04-14 15:02:35 +0200
committerJohan Lundberg <lundberg@nordu.net>2014-04-14 15:02:35 +0200
commit36216fd862fac32466fa641a7f531c2073fd8852 (patch)
tree3997ac87deb2af1a952bf5a365e460fe160266de /meetingtools
parentd3dcf119d0ace07efdc4f576e5c783b4df017471 (diff)
Check if you get a sco_element before continuing.
Diffstat (limited to 'meetingtools')
-rw-r--r--meetingtools/apps/content/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/meetingtools/apps/content/models.py b/meetingtools/apps/content/models.py
index 621111f..8f36833 100644
--- a/meetingtools/apps/content/models.py
+++ b/meetingtools/apps/content/models.py
@@ -55,9 +55,8 @@ 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 not sco_element.get('source-sco-id'): # Object is not a reference
+ if sco_element 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:
owner = get_owner_by_folder(api, acc, sco_element)