Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: buildFilesFromDateQuery doesn't work properly #395

Open
Merkur39 opened this issue Mar 23, 2023 · 0 comments
Open

Fix: buildFilesFromDateQuery doesn't work properly #395

Merkur39 opened this issue Mar 23, 2023 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@Merkur39
Copy link
Member

Cette requête peut retourner des fichiers n'ayant pas d'attribut metadata, elle devrait plutôt ressembler à ceci pour être sûr d'avoir l'attribut metadata.

return {
    definition: Q(FILES_DOCTYPE)
      .where({
        'cozyMetadata.updatedAt': { $gt: date },
        metadata: { $exists: true }
      })
      .partialIndex({
        type: 'file',
        trashed: false
      })
      .indexFields(['metadata', 'type', 'cozyMetadata.updatedAt'])
      .limitBy(limit)
      .sortBy([{ type: 'asc' }, { 'cozyMetadata.updatedAt': 'asc' }])
  }

Si cela fonctionne correctement nous pourrons nous passer de filtrer les fichiers dans le fichier metadataMigration.js

@Merkur39 Merkur39 added the 🐛 bug Something isn't working label Mar 23, 2023
@Merkur39 Merkur39 changed the title Fix: Request files without metadata doesn't work properly Fix: buildFilesFromDateQuery doesn't work properly Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant