Fix specific postgre request problem in factory