fixed problem with generating empty records.
changed the definition of generate_post_params/2,