WHOIGit / ifcbdb

IFCB dashboard
MIT License
8 stars 9 forks source link

A user can add the same data directory path multiple times to a dataset #411

Open ethanandrews opened 2 weeks ago

ethanandrews commented 2 weeks ago

When adding a new data directory to a dataset, it's possible to add the same data directory path multiple times, there doesn't seem to be any validation of whether a new data directory already exists. This is the case either through the Django management command, or using the web UI.

Screenshot 2024-08-29 at 3 06 43 PM
joefutrelle commented 2 weeks ago

@mike-kaimika I think the appropriate unique constraint, plus a UI to provide feedback on errors, should do it

mike-kaimika commented 2 weeks ago

This should be all set. The attached PR adds the unique constraint, which handled the UI validation. I also added validation to the management command