-
Notifications
You must be signed in to change notification settings - Fork 0
feat(brevo): update deal attributes during pipeline sync #641
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
base: master
Are you sure you want to change the base?
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
| if existing_deal.get(key) != value: | ||
| changed_attributes[key] = value | ||
|
|
||
| if stage_changed or changed_attributes: |
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.
🟠 si stage_changed est false il faudrait peut être vérifier que changed_attributes n'est pas vide
| for company_key, brevo_key in field_mappings.items(): | ||
| value = company.get(company_key) | ||
| if value is not None: | ||
| attributes[brevo_key] = value |
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 à pas besoin du cas où on veut vider un champ et donc où value serait None volontairement ?
|
|
||
| if stage_changed: | ||
| result.updated_deals += 1 |
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 veut pas considérer le deal comme updated si les attributs changent mais pas le stage ?
| for key, value in attributes.items(): | ||
| if existing_deal.get(key) != value: | ||
| changed_attributes[key] = value |
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 me demande si on peut avoir des valeurs similaire lors de la comparaison mais avec des types différents ? ce qui ferais un update non nécessaire, par exemple si 0 vs None ou 1 vs "1"



https://trello.com/c/rFhwSvMy/2423-brevo-mettre-%C3%A0-jour-lensemble-des-attributs-dun-deal