-
Notifications
You must be signed in to change notification settings - Fork 25
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
API: ajout des filtres departement
et departement_postes
sur la route /api/v1/siaes/
#4270
Conversation
itou/api/siae_api/viewsets.py
Outdated
field_name="department", choices=list(DEPARTMENTS.items()), help_text="Département de la structure" | ||
) | ||
|
||
departement_postes = ChoiceFilter( |
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 vous avez un meilleur nom de filtre, je suis preneur 😬
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.
Ça m’a l’air très bien 👍
response, "Le paramètre `distance_max_km` doit être compris entre 0 et 100", status_code=400 | ||
) | ||
assert response.status_code == 400 | ||
assert response.json() == {"distance_max_km": ["Assurez-vous que cette valeur est inférieure ou égale à 100."]} |
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.
Faudrait-il également une mention dans la release note de ce changement ? C’est un breaking change.
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.
Certes mais comme on est sur un cas d'erreur et que j'espère qu'aucun système automatique ne s'amuse à envoyer des données invalides j'aurais tendance à laisser tel quel.
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.
Juste une mention dans le changelog ne me semble pas trop lourde, et évite des surprises aux utilisateurs ?
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.
Mais comment ajouter des choses dans le changelog en dehors du titre de cette PR ?
Je rajoute ainsi qu'une modification du format de certaines erreurs
à la fin du titre ?
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.
nvim CHANGELOG.md
? La génération automatique est bien dans la plupart des cas, mais c’est pas la seule manière ;)
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.
C'est un coup à péter la prochaine PR de changelog non ?
cls.company_with_jobs = CompanyFactory( | ||
with_jobs=True, romes=("N1101", "N1105", "N1103", "N4105"), department="44", coords=cls.saint_andre.coords | ||
) | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.client = APIClient() |
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.
À se demander si le setUp
est encore utile...
) | ||
# Here the department filter has been applied | ||
# Here the department/job_department filters have been applied |
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.
departement_postes
pour correspondre au nom du filtre ?
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.
postes_dans_le_departement
?
9bd11ce
to
cee5cc3
Compare
cee5cc3
to
b144e94
Compare
🤔 Pourquoi ?
Certains départements souhaitent pouvoir facilement récupérer la liste des entreprises opérant sur leur territoire.
🍰 Comment ?
💻 Captures d'écran
🚨 À vérifier
🏝️ Comment tester