This is the sql query
DELETE FROM common.machine_portion_group
WHERE mp=%(mp)s::text AND group_id = ANY(%(group_ids)s)::int;
I received the message
ERROR: msg=operator does not exist: integer = textnLINE 3:
WHERE mp='1804'::text AND group_id = ANY(ARRAY['93...n ^nHINT:
No operator matches the given name and argument types. You might need to add explicit type casts.n.
In the database mp is an integer and it was passed through as a string. In the database group_id is a integer but from the error looks like an array of strings. How can I cast this sql query for both mp and group_id? Would group_id be cast as text?