0

I got a web page online and everything works fine. Except when I try do delete a user I get the following error:

{ProgrammingError at /admin/auth/user/ 
operator does not exist: text = integer
LINE 1: ...OIN "auth_user" ON ("avtimessolver"."employee_id" = "auth_us...
                                                         ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.}

I am using Django with nginx, gunicorn and postgresql.

Is there anything wrong with my model? The table avtimessolver is generated by an algorithm where i save the id as names so that Django displays names rather than ids in some queries.

Is there any way to fix this without changeing the table, so that the delete function also accepts user names as input?

Any help is appreciated.

Lukas Humpe
  • 421
  • 3
  • 10
  • 1
    I don't understand this reference to an algorithm, but it sounds like you are doing something strange. It would be helpful to explain in more detail, and show your models, as I am certain there will be simpler ways of doing whatever it is. – Daniel Roseman Jul 21 '18 at 10:32
  • @DanielRoseman avtimessolver takes data from another table and saves it into table a MIP solver can use as Input (used for optimizing a shift plan). – Lukas Humpe Jul 21 '18 at 10:33
  • add the model and admin code pleade – Ali Jul 21 '18 at 11:29

0 Answers0