nautobot-app-circuit-maintenance icon indicating copy to clipboard operation
nautobot-app-circuit-maintenance copied to clipboard

Deleting a Provider should not delete associated RawNotifications and ParsedNotifications

Open glennmatthews opened this issue 2 years ago • 1 comments

Environment

  • Nautobot version: 1.1.4
  • nautobot-circuit-maintenance version: 0.3.2

Expected Behavior

On deleting a Provider, circuit-maintenance records should not be auto-deleted, although any references to that Provider should be nulled out.

Observed Behavior

Deleting a Provider deletes all of its associated RawNotifications and ParsedNotifications, although CircuitMaintenances remain present since they are linked to Circuits rather than Providers.

Steps to Reproduce

This happened in a user environment where, due to provider mergers and name changes, we had multiple Provider records that actually referred to the same company. After migrating all relevant Circuits to the correct single, consolidated, Provider record, I deleted the old Provider which no longer had any associated Circuits. To my surprise, this also deleted a slew of older RawNotifications and ParsedNotifications as they were associated to the old Provider still. The result is that I still have valid CircuitMaintenance records (since the Circuits were not deleted and are now associated to the new provider) but no longer any references to the parsed data that originated these records.

I would have preferred for the old RawNotification and ParsedNotification records to remain available, presumably with null provider references, rather than being deleted.

glennmatthews avatar Nov 16 '21 14:11 glennmatthews