Empty facts not saved into foreman


I found out foreman does not store facts having an empty value. I checked
out that facts are successfully returned by running "facter -p" on the node
and correctly saved as empty strings under /var/lib/puppet/yaml/facts/ on
the puppet master. So it looks like somehow foreman APIs filter them out.

Moreover there is no way in foreman to search for hosts having a specific
fact not set.
Did anyone run into this and found a solution?

Thanks in advance,
Paolo Larcheri