Skip to content

Comments

Fix/delete site with childs#429

Open
andriacap wants to merge 3 commits intoPnX-SI:developfrom
naturalsolutions:fix/delete-site-with-childs
Open

Fix/delete site with childs#429
andriacap wants to merge 3 commits intoPnX-SI:developfrom
naturalsolutions:fix/delete-site-with-childs

Conversation

@andriacap
Copy link
Contributor

Cette PR propose de régler le problème lié à la possibilité de supprimer un site partagé entre deux ou plusieurs modules alors que ce dernier à un au moins une visite dans un de ces modules.

Voir issue : #417
Close: #417

Frontend check only site with childs from specific protocol. If one site has visit in another protocol you
can delete the site because in this specific protocol there are no visit.

- Add check backend on route delete

Reviewed-by: andriacap
- test backend to check http response with code 403 and error message

Reviewed-by: andriacap
@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.31%. Comparing base (37ca00a) to head (a304faf).
Report is 37 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #429      +/-   ##
===========================================
- Coverage    75.93%   75.31%   -0.62%     
===========================================
  Files           30       30              
  Lines         2410     2443      +33     
===========================================
+ Hits          1830     1840      +10     
- Misses         580      603      +23     
Flag Coverage Δ
pytest 75.31% <100.00%> (-0.62%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andriacap andriacap marked this pull request as ready for review April 8, 2025 12:55
@andriacap
Copy link
Contributor Author

Il y a un problème avec le codecov étant donné que des tests ont été ajoutés dans la PR et que les lignes ajoutées sont couvertes par les tests.

@amandine-sahl
Copy link
Contributor

top, je me demande si il ne faudrait pas également considérer le cas pour les groupes de sites.

Pour le front, il faudrait peut être remonter un paramètre nb_visits_total de façon à bloquer la suppression de façon à éviter à l'utilisateur un message d'erreur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants