Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion everpad/provider/sync/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ def _receive_resources(self, note, note_ttype):
resources_ids = []

for resource_ttype in note_ttype.resources or []:
if resource_ttype.data.size and not resource_ttype.data.body:
resource_ttype = self.note_store.getResource(self.auth_token,
guid=resource_ttype.guid, withData=True, withRecognition=True, withAttributes=True, withAlternateData=False)
try:
resource = self.session.query(models.Resource).filter(
models.Resource.guid == resource_ttype.guid,
Expand All @@ -285,7 +288,6 @@ def _receive_resources(self, note, note_ttype):
self.session.add(resource)
self.session.commit()
resources_ids.append(resource.id)

return resources_ids

def _remove_resources(self, note, resources_ids):
Expand Down