-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(Besoins): mettre à jour l'utilisateur de la mise en relation #1144
Conversation
22d0a18
to
7ff45f3
Compare
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.
LGTM ! Juste deux petites "suggestions"
TenderSiae.objects.filter(tender=self.object, siae_id=self.siae_id, email_link_click_date=None).update( | ||
email_link_click_date=timezone.now(), updated_at=timezone.now() | ||
) | ||
if self.user_id: # TODO: check if user in siae ? |
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.
En effet, je pense qu'on peut regarder si il est dans la structure. Ça permettra au passage de vérifier l'existence de l'id user en base.
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.
t'as raison, je vais le faire dans une PR juste après : #1150
self.assertEqual(self.tender_1.tendersiae_set.count(), 4) # unchanged | ||
siae_2_email_link_click_date = self.tender_1.tendersiae_set.first().email_link_click_date | ||
self.assertIsNotNone(siae_2_email_link_click_date) # email_link_click_date updated | ||
self.assertIsNotNone(self.tender_1.tendersiae_set.first().user) # user updated |
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.
Tu peux même vérifier que c'est bien siae_user_2
7ff45f3
to
fd28155
Compare
fd28155
to
08454de
Compare
Quoi ?
Suite à #1143, lorsqu'on connait l'utilisateur, on le met à jour
Comment ?
Lors du clic dans l'e-mail envoyé aux structures (et aux utilisateurs de cette structure) :
user_id
, alors on rajoute l'info