Delete Entities with an Action
Entities with an action can not be deleted at the main time. We noticed that at ufz-stage server and I can confirm it locally
{
"errors": [
{
"detail": "Deletion failed for the device.",
"source": "Delete object error: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)\n(psycopg2.errors.NotNullViolation) null value in column \"device_id\" violates not-null constraint\nDETAIL: Failing row contains (2022-04-06 12:24:37.414438, 2022-04-06 12:29:25.129313, 1, null, , Device Visit, https://localhost.localdomain/cv/api/v1/actiontypes/11/, 2022-04-07 12:24:00, null, 1, null, null).\n\n[SQL: UPDATE generic_device_action SET updated_at=%(updated_at)s, device_id=%(device_id)s WHERE generic_device_action.id = %(generic_device_action_id)s]\n[parameters: {'updated_at': datetime.datetime(2022, 4, 6, 12, 29, 25, 129313), 'device_id': None, 'generic_device_action_id': 1}]\n(Background on this error at: https://sqlalche.me/e/14/gkpj)",
"status": 409,
"title": "Conflict"
}
],
"jsonapi": {
"version": "1.0"
}
}