Describe the bug
Got a 500 error when trying to delete an InspectionArea with Swagger
To Reproduce
Steps to reproduce the behavior:
- call DELETE inspectionAreas/{id} in Swagger for an existing inspectionArea ID
- observe that the error message in the Flotilla backend is:
System.InvalidOperationException: The instance of entity type 'Installation' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.
Expected behavior
The inspectionArea should have been deleted