geobeyond / Arpav-PPCV-backend

Backend di Piattaforma Proiezioni Climatiche per il Nord-Est.
Creative Commons Attribution 4.0 International
0 stars 1 forks source link

cannot delete coverage configuration via admin when it contains related coverages #104

Open ricardogsilva opened 1 month ago

ricardogsilva commented 1 month ago

The admin is not able to delete a coverage configuration when it has related coverages, throwing an error like:

AssertionError: Dependency rule on column 'coverageconfiguration.id' tried to blank-out primary key column 'relatedcoverageconfiguration.main_coverage_configuration_id' on instance '<RelatedCoverageConfiguration at 0x7dc2a3e4fab0>'
ricardogsilva commented 1 month ago

As a workaround, it is possible to remove the related coverages and then delete the coverage configuration