diff --git a/pandora/document/models.py b/pandora/document/models.py index ef2e491ec..78bc3f11b 100644 --- a/pandora/document/models.py +++ b/pandora/document/models.py @@ -600,7 +600,7 @@ class Document(models.Model): def update_linked_documents(self): if self.extension == 'html': old = [d.id for id in self.linked_documents.all()] - current = utils.get_documents(self.data['text']) + current = utils.get_documents(self.data.get('text', '')) removed = list(set(old) - set(current)) added = list(set(current) - set(old)) if removed: diff --git a/static/js/embedDocumentDialog.js b/static/js/embedDocumentDialog.js index 535636d0d..15423a056 100644 --- a/static/js/embedDocumentDialog.js +++ b/static/js/embedDocumentDialog.js @@ -18,7 +18,7 @@ pandora.ui.embedDocumentDialog = function(id, position) { marginTop: '8px' }) .val( - '' diff --git a/static/js/textPanel.js b/static/js/textPanel.js index fe3379311..d54ef918e 100644 --- a/static/js/textPanel.js +++ b/static/js/textPanel.js @@ -386,7 +386,7 @@ pandora.ui.textHTML = function(text) { ? pandora.user.ui.documents[pandora.user.ui.part.document] : pandora.user.ui.section == 'documents' ? pandora.user.ui.documents[pandora.user.ui.document] - : {}), + : {}) || {}, position = settings.position || 0, element, scrollTop;