Add & Delete object error in SMS stage server
Add faild for a device:
"errors":
{
"detail": "Object creation error: (psycopg2.errors.InsufficientPrivilege) permission denied for sequence device_id_seq\n\n[SQL: INSERT INTO device (created_at, updated_at, description, short_name, long_name, serial_number, manufacturer_uri, manufacturer_name, dual_use, model, inventory_number, persistent_identifier, website, device_type_uri, device_type_name, status_uri, status_name, created_by_id, updated_by_id) VALUES (%(created_at)s, %(updated_at)s, %(description)s, %(short_name)s, %(long_name)s, %(serial_number)s, %(manufacturer_uri)s, %(manufacturer_name)s, %(dual_use)s, %(model)s, %(inventory_number)s, %(persistent_identifier)s, %(website)s, %(device_type_uri)s, %(device_type_name)s, %(status_uri)s, %(status_name)s, %(created_by_id)s, %(updated_by_id)s) RETURNING device.id]\n[parameters: {'created_at': datetime.datetime(2022, 2, 25, 14, 6, 23, 458345), 'updated_at': None, 'description': '', 'short_name': 'Test from stage server', 'long_name': '', 'serial_number': '', 'manufacturer_uri': '', 'manufacturer_name': '', 'dual_use': False, 'model': '', 'inventory_number': '', 'persistent_identifier': None, 'website': '', 'device_type_uri': '', 'device_type_name': '', 'status_uri': '', 'status_name': '', 'created_by_id': 1, 'updated_by_id': None}]\n(Background on this error at: https://sqlalche.me/e/14/f405)",
}
Deletion failed for a device
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 (2021-07-27 07:14:33.644952, 2022-02-21 14:36:33.189878, 3, null, Kaputt gemacht, Device Maintenance, https://rdm-test.intranet.ufz.de/sms-cv/api/v1/actiontypes/5/, 2021-07-27 09:14:00, 2021-07-27 09:14:00, 2, 2, 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, 2, 21, 14, 36, 33, 189878), 'device_id': None, 'generic_device_action_id': 3}]\n(Background on this error at: https://sqlalche.me/e/14/gkpj)
Edited by Kotyba Alhaj Taha