Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Plug Batch info on Kitt callback and move back City on User to simplify validation logic. #325
Plug Batch info on Kitt callback and move back City on User to simplify validation logic. #325
Changes from 7 commits
c5f09b0
4850c9a
0a6f168
7e56926
52b3889
2b55247
f7205a4
837b0bc
07e6384
828396b
194c053
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai complètement oublié de passer sur les computers. Bien vu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce que ça veut dire qu'on crée un batch
0
quoi qu'il arrive ? C'est mieux un batch0
ou un batchnil
? cc @AquajEdit : à choisir,
nil
ça évite d'afficher un vieux0
tout moche dans le frontThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sauf que
nil.to_i == 0
, il faudrait échapper avec.&
non ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La validation du Batch ne permet pas de creer un batch avec un
number
0Donc nil.to_i ne respectera pas la validation et le batch ne sera pas persisté du coup le batch sera nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non on en a besoin. C'est elle qui force l'User à s'aligner sur son batch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y a pas de choix, donc y a pas besoin de forcer.
Un user qui a un batch se connecte ?
alors le User model recupere le batch et la city. KittAuth peu pas se tromper, notre data viens du meme endroit donc si ils ont tord, on a tord.
Et comme il a deja les deux il pourras jamais changer.
Un user a pas de batch ?
Alors on a rien a verifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense qu'il y a eu quiproquo: quand je dis "C'est elle qui force l'User à s'aligner sur son batch." ce que je veux dire c'est que c'est elle qui force l'User à s'aligner sur son batch dans notre modèle de donnée. Ça rend explicite une relation qui est seulement implicite ici.
"Y'a pas de choix donc pas besoin de forcer" c'est pas un bon argument. On est dans la couche de cohérence des données là, la présence ou absence de choix est dans la couche applicative.
C'est pas la mort de l'avoir enlevée, mais je trouve ça dommage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On pourra peut-être rétablir 🫣