Skip to content

Commit

Permalink
String to int
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Mar 29, 2024
1 parent 2eaf257 commit 08454de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lemarche/www/tenders/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,13 @@ def get(self, request, *args, **kwargs):
# update 'email_link_click_date'
if self.siae_id:
if self.user_id: # TODO: check if user in siae ?
TenderSiae.objects.filter(tender=self.object, siae_id=self.siae_id, email_link_click_date=None).update(
user_id=self.user_id, email_link_click_date=timezone.now(), updated_at=timezone.now()
)
TenderSiae.objects.filter(
tender=self.object, siae_id=int(self.siae_id), email_link_click_date=None
).update(user_id=int(self.user_id), email_link_click_date=timezone.now(), updated_at=timezone.now())
else:
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()
)
TenderSiae.objects.filter(
tender=self.object, siae_id=int(self.siae_id), email_link_click_date=None
).update(email_link_click_date=timezone.now(), updated_at=timezone.now())
# update 'detail_display_date'
if user.is_authenticated:
if user.kind == User.KIND_SIAE:
Expand Down

0 comments on commit 08454de

Please sign in to comment.