Skip to content

Fix: buildFilesFromDateQuery doesn't work properly #395

@Merkur39

Description

@Merkur39

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions