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': '|'
|
||||
},
|
||||
'keys': ['item', 'id'],
|
||||
'keys': ['item', 'id', 'extension'],
|
||||
'range': [0, 5000]
|
||||
})['data']['items']
|
||||
d = self.api.findDocuments({
|
||||
|
@ -781,11 +781,14 @@ class Client(object):
|
|||
],
|
||||
'operator': '|'
|
||||
},
|
||||
'keys': ['id', 'oshash'],
|
||||
'keys': ['id', 'oshash', 'extension'],
|
||||
'range': [0, len(files)]
|
||||
})['data']['items']
|
||||
available = set(f['oshash'] for f in d)
|
||||
missing = [(f['id'], f['item']) for f in files if f['id'] not in available]
|
||||
available = set(f['oshash']
|
||||
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
|
||||
|
||||
def _add_document(self, f, item=None):
|
||||
|
|
Loading…
Reference in a new issue