pkg/graphdb: move the db.get() to be done first

Signed-off-by: Vincent Batts <vbatts@redhat.com>