forked from 0x2620/pandora
fix documents
This commit is contained in:
parent
fb1c42ffaf
commit
fbd94867fc
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ class Annotation(models.Model):
|
||||||
def update_documents(self):
|
def update_documents(self):
|
||||||
from document.models import Document
|
from document.models import Document
|
||||||
from document.utils import get_documents
|
from document.utils import get_documents
|
||||||
old = [d.id for id in self.documents.all()]
|
old = [d.id for d in self.documents.all()]
|
||||||
current = get_documents(self.value) if self.value else []
|
current = get_documents(self.value) if self.value else []
|
||||||
removed = list(set(old) - set(current))
|
removed = list(set(old) - set(current))
|
||||||
added = list(set(current) - set(old))
|
added = list(set(current) - set(old))
|
||||||
|
|
Loading…
Reference in a new issue