Skip to content

Commit

Permalink
Merge pull request #956 from girder/fix-user-document-check
Browse files Browse the repository at this point in the history
Fix checking user annotation document length
  • Loading branch information
manthey authored Sep 1, 2022
2 parents 9ea10f9 + 5ebaf57 commit 830c94a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Bug Fixes
- Harden adding images to the item list ([955](../../pull/955))
- Fix checking user annotation document length ([956](../../pull/956))

## 1.16.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def updateElementChunk(self, elements, chunk, chunkSize, annotation, now):
if (len(entries) == 1 and (len(entries[0]['element'].get(
'points', entries[0]['element'].get('values', []))) > MAX_ELEMENT_DOCUMENT or (
'user' in entries[0]['element'] and
len(pickle.dumps(entries[0]['element'], protocol=4) > MAX_ELEMENT_USER_DOCUMENT)))):
len(pickle.dumps(entries[0]['element'], protocol=4)) > MAX_ELEMENT_USER_DOCUMENT))):
self.saveElementAsFile(annotation, entries)
res = self.collection.insert_many(entries, ordered=False)
for pos, entry in enumerate(entries):
Expand Down

0 comments on commit 830c94a

Please sign in to comment.