exception in registration on postgres

When I'm trying to register on postgres there is an exception.
fixed bug.