There are case where the `action` dict is not there and case where it is

This also fixes the tests suite
Merge pull request #130 from fedora-infra/new_pkgdb

There are case where the `action` dict is not there and case where it is