Skip to content

Commit

Permalink
move constants in dedicatd file
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Jan 16, 2024
1 parent f761b77 commit 8069f3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lemarche/tenders/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,15 @@
(SOURCE_API, "API"),
(SOURCE_TALLY, "TALLY"),
)

TENDER_SIAE_SOURCE_EMAIL = "EMAIL"
TENDER_SIAE_SOURCE_DASHBOARD = "DASHBOARD"
TENDER_SIAE_SOURCE_LINK = "LINK"
TENDER_SIAE_SOURCE_AI = "AI"

TENDER_SIAE_SOURCE_CHOICES = (
(TENDER_SIAE_SOURCE_EMAIL, "E-mail"),
(TENDER_SIAE_SOURCE_DASHBOARD, "Dashboard"),
(TENDER_SIAE_SOURCE_LINK, "Lien"),
(TENDER_SIAE_SOURCE_AI, "IA"),
)
2 changes: 1 addition & 1 deletion lemarche/www/tenders/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def get(self, request, *args, **kwargs):
if not user.has_tender_siae(self.object):
for siae in user.siaes.all():
TenderSiae.objects.create(
tender=self.object, siae=siae, source=TenderSiae.TENDER_SIAE_SOURCE_LINK
tender=self.object, siae=siae, source=tender_constants.TENDER_SIAE_SOURCE_LINK
)
# update stats
TenderSiae.objects.filter(
Expand Down

0 comments on commit 8069f3e

Please sign in to comment.