migrate_dbstats: Fix traceback found by jonten

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>