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

feat(brevo): créer les objets dans Brevo lors de leur création en BDD #1651

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

nicolasabrn
Copy link
Collaborator

@nicolasabrn nicolasabrn commented Feb 4, 2025

Quoi ?

  • Suppression du code inutile
  • Création des COMPANIES, SIAES, USERS et TENDERS dans Brevo dès leur création

Pourquoi ?

Nous allons gérer l'ensemble des synchronisations BREVO hors produit.
Nous avons désormais uniquement besoin de créer les objets et de stocker leur ID Brevo dans le produit

@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from e56f4b9 to 5b54e8a Compare February 4, 2025 17:28
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-companies-to-brevo branch from 7a7cab7 to acdf3d4 Compare February 4, 2025 17:42
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch 2 times, most recently from 632a328 to 9893ddb Compare February 4, 2025 17:45
@madjid-asa madjid-asa force-pushed the nicolasabrn/create-deals-on-validation branch from 9893ddb to bfbdb8a Compare February 4, 2025 21:24
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-companies-to-brevo branch from 0c41609 to 64f89a9 Compare February 5, 2025 08:59
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from bfbdb8a to ee64b0b Compare February 5, 2025 09:00
@nicolasabrn nicolasabrn self-assigned this Feb 5, 2025
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from ee64b0b to 2bd8190 Compare February 6, 2025 14:00
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-companies-to-brevo branch from a1196e1 to 6692c86 Compare February 6, 2025 14:36
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch 2 times, most recently from 8b9bd83 to 509b296 Compare February 6, 2025 16:31
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-companies-to-brevo branch from 6692c86 to 0fb5033 Compare February 7, 2025 11:11
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch 2 times, most recently from b90a516 to cdcc4d0 Compare February 10, 2025 08:12
@nicolasabrn nicolasabrn marked this pull request as ready for review February 10, 2025 08:12
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch 2 times, most recently from 3959c2c to 41b8de6 Compare February 10, 2025 10:20
@nicolasabrn nicolasabrn added the recette-jetable Déclenche une recette jetable sur CC label Feb 10, 2025
Copy link
Contributor

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@nicolasabrn nicolasabrn changed the base branch from nicolasabrn/create-companies-to-brevo to master February 10, 2025 14:46
NicolasAbrn and others added 17 commits February 10, 2025 15:47
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch 3 times, most recently from 954efbf to 84605f3 Compare February 10, 2025 15:17
@nicolasabrn nicolasabrn changed the title feat(brevo): create all tenders in Brevo on validation feat(brevo): créer les objets dans Brevo lors de leur création en BDD Feb 10, 2025
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from 84605f3 to 9d97b32 Compare February 11, 2025 08:33
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from 9d97b32 to 4ad29c8 Compare February 11, 2025 08:34
clevercloud/cron.json Show resolved Hide resolved
lemarche/utils/apis/api_brevo.py Outdated Show resolved Hide resolved
lemarche/companies/models.py Show resolved Hide resolved
@receiver(post_save, sender=Company)
def create_company_in_brevo(sender, instance, created, **kwargs):
if created:
from lemarche.utils.apis.api_brevo import create_company
Copy link
Collaborator

Choose a reason for hiding this comment

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

Il y a un problème d'import circulaire ?

lemarche/siaes/tests/test_models.py Outdated Show resolved Hide resolved
field_name = "address"
previous_field_name = f"__previous_{field_name}"
if getattr(instance, field_name) and getattr(instance, field_name) != getattr(instance, previous_field_name):
set_siae_coords(sender, instance)

# Handle Brevo company creation
if created:
from lemarche.utils.apis.api_brevo import create_company
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aussi un pb d'import circulaire ?

lemarche/tenders/models.py Outdated Show resolved Hide resolved
lemarche/utils/apis/api_brevo.py Outdated Show resolved Hide resolved
lemarche/utils/apis/api_brevo.py Outdated Show resolved Hide resolved
@nicolasabrn nicolasabrn force-pushed the nicolasabrn/create-deals-on-validation branch from 98d72e1 to 7498885 Compare February 12, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recette-jetable Déclenche une recette jetable sur CC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants