At that time, there is no account-id set which results in an empty string, what pgSql dont likes in integer fields. Casting it to int now.