fix bug in update_or_create_by