Can't add device

Tracker2 years ago

I am trying to add a new device but I am getting this error.
Yesterday everything was working normally, but after deleting a user this error occurred.

Cannot add or update a child row: a foreign key constraint fails (`tracker_x`.`tc_user_device`, CONSTRAINT `fk_user_device_userid` FOREIGN KEY (`userid`) REFERENCES `tc_users` (`id`)) - SQLIntegrityConstraintViolationException (... < QueryBuilder:461 < DatabaseStorage:77 < DataManager:258 < ...)
Anton Tananaev2 years ago

The error seems to indicate that you're trying to add a device to a deleted user, which would obviously fail.

Tracker2 years ago

I am trying to add inside an admin user, I think it should work normally. I cannot find where it is specified for which user I am creating the device.

Anton Tananaev2 years ago

What kind of admin user? Service account?

Tracker2 years ago

YES, an admin type account

Anton Tananaev2 years ago

Please carefully read my question. You have not answered it.

Tracker2 years ago

I created a user, which I gave admin privileges to. Within that user I add new devices, but from today that error appears.

Anton Tananaev2 years ago

OK, so it's a admin, but not a service account admin. Then I don't know how you got to this situation.