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

Admin: Ajout d'un message warning lors de la selection d'une organisation non habilité pour un diagnostic d'éligibilité. #5486

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

tonial
Copy link
Contributor

@tonial tonial commented Jan 28, 2025

🤔 Pourquoi ?

Histoire d'éviter des erreurs involontaires

🍰 Comment ?

Décrivez en quelques mots la solution retenue et mise en oeuvre, les difficultés ou problèmes rencontrés. Attirez l'attention sur les décisions d'architecture ou de conception importantes.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?
  • Ajouter l'étiquette « Bug » ?

🏝️ Comment tester ?

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

@tonial tonial self-assigned this Jan 28, 2025
@tonial tonial requested a review from xavfernandez January 28, 2025 09:46
Copy link
Contributor

@xavfernandez xavfernandez left a comment

Choose a reason for hiding this comment

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

👍

@@ -181,6 +181,9 @@ def is_valid(self, obj):
def save_model(self, request, obj, form, change):
if not obj.pk:
obj.expires_at = self.model._expiration_date(obj.author)
# We cannot make this message in the admin form
if obj.author_prescriber_organization_id and not obj.author_prescriber_organization.is_authorized:
messages.warning(request, "L'organisation prescriptrice n'est actuellement pas habilité.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
messages.warning(request, "L'organisation prescriptrice n'est actuellement pas habilité.")
messages.warning(request, "L'organisation prescriptrice n'est actuellement pas habilitée.")

@tonial tonial force-pushed the alaurent/admin_diags_2 branch from 0b556ba to acd25ae Compare January 28, 2025 10:13
@tonial tonial enabled auto-merge January 28, 2025 10:13
@tonial tonial added this pull request to the merge queue Jan 28, 2025
Merged via the queue into master with commit c579dab Jan 28, 2025
9 checks passed
@tonial tonial deleted the alaurent/admin_diags_2 branch January 28, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants