only check documents
This commit is contained in:
parent
733b909981
commit
ad7570c496
1 changed files with 7 additions and 4 deletions
|
@ -770,7 +770,7 @@ class Client(object):
|
||||||
],
|
],
|
||||||
'operator': '|'
|
'operator': '|'
|
||||||
},
|
},
|
||||||
'keys': ['item', 'id'],
|
'keys': ['item', 'id', 'extension'],
|
||||||
'range': [0, 5000]
|
'range': [0, 5000]
|
||||||
})['data']['items']
|
})['data']['items']
|
||||||
d = self.api.findDocuments({
|
d = self.api.findDocuments({
|
||||||
|
@ -781,11 +781,14 @@ class Client(object):
|
||||||
],
|
],
|
||||||
'operator': '|'
|
'operator': '|'
|
||||||
},
|
},
|
||||||
'keys': ['id', 'oshash'],
|
'keys': ['id', 'oshash', 'extension'],
|
||||||
'range': [0, len(files)]
|
'range': [0, len(files)]
|
||||||
})['data']['items']
|
})['data']['items']
|
||||||
available = set(f['oshash'] for f in d)
|
available = set(f['oshash']
|
||||||
missing = [(f['id'], f['item']) for f in files if f['id'] not in available]
|
for f in d if f['extension'] in DOCUMENT_FORMATS)
|
||||||
|
missing = [(f['id'], f['item']) for f in files \
|
||||||
|
if f['id'] not in available \
|
||||||
|
and f['extension'] in DOCUMENT_FORMATS]
|
||||||
return missing
|
return missing
|
||||||
|
|
||||||
def _add_document(self, f, item=None):
|
def _add_document(self, f, item=None):
|
||||||
|
|
Loading…
Reference in a new issue