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

1849 metabase dump fix #1864

Merged
merged 6 commits into from
Nov 14, 2023
Merged

1849 metabase dump fix #1864

merged 6 commits into from
Nov 14, 2023

Conversation

alice-telescoop
Copy link
Collaborator

closes #1849

])
.toArray();

await collection.updateMany(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je comprend pas trop cette partie la ? On supprime le user des logs ducoup ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce qu'on supprime c'est un artefact. En gros ya deux types de logs :

  1. les logs où un utilisateur est connecté
  2. les logs où aucun utilisateur n'est connecté

Le aggregate :

  • fait un join avec la table user
  • remplit meta.req.user._id avec la valeur qui va bien

Pour le cas 1. c'est tout bon.
Mais pour le cas 2, écrire undefined dans meta.req.user._id ça crée un objet meta.req.user qui n'était pas là et dont on ne veut pas. Je n'ai pas trouvé de moyen de ne pas le créer, donc je le renlève après.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

si mon explication te convient on merge

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes on merge

@alice-telescoop alice-telescoop merged commit 0dd546c into develop Nov 14, 2023
3 of 4 checks passed
@alice-telescoop alice-telescoop deleted the 1843-metabase-dump-fix branch November 14, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Réparer les données metabase pour pouvoir faire des jointures sur l'ObjectId
3 participants