fix editing html documents

This commit is contained in:
j 2017-02-16 18:31:24 +01:00
parent 74407183ac
commit 2f6e7d39c9

View file

@ -599,7 +599,7 @@ class Document(models.Model):
def update_linked_documents(self): def update_linked_documents(self):
if self.extension == 'html': if self.extension == 'html':
old = [d.id for id in self.linked_documents.all()] old = [d.id for d in self.linked_documents.all()]
current = utils.get_documents(self.data.get('text', '')) current = utils.get_documents(self.data.get('text', ''))
removed = list(set(old) - set(current)) removed = list(set(old) - set(current))
added = list(set(current) - set(old)) added = list(set(current) - set(old))