How to fix Cannot coerce in PostgreSQL | DevErrors