Undefined method during Foreman offline backup

Problem:
Foreman-maintain fails during offline backup. During the “Generate metadata” step, Foreman throws an error stating an undefined method.

Expected outcome:
Create a full backup of my foreman server with metadata included.

Foreman and Proxy versions:
3.2.1 & 3.2.0

Foreman and Proxy plugin versions:

foreman_default_hostgroup - 6.0.0
foreman_memcache - 0.1.1
foreman_puppet - 3.0.7

Distribution and version:

Other relevant data:
Here’s the output from Foreman-maintain…

 foreman-maintain backup offline /mnt/tmp
Starting backup: 2023-03-15 11:29:13 -0700
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up:
/ Checking connection to the Foreman DB                               [OK]
--------------------------------------------------------------------------------


Running Backup
================================================================================
Confirm turning off services is allowed:
WARNING: This script will stop your services.

Do you want to proceed?, [y(yes), q(quit)] y
                                                                      [OK]
--------------------------------------------------------------------------------
Prepare backup Directory:
Creating backup folder /mnt/tmp/foreman-backup-2023-03-15-11-29-13    [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable:                        [OK]
--------------------------------------------------------------------------------
Generate metadata:
- Collecting proxy configuration                                      [FAIL]
undefined method `[]' for false:FalseClass
--------------------------------------------------------------------------------
Scenario [Backup] failed.

The following steps ended up in failing state:

  [backup-metadata]

Resolve the failed steps and rerun the command.
In case the failures are false positives, use
--whitelist="backup-metadata"



Running Failed backup cleanup
================================================================================
Start applicable services:

Starting the following service(s):
postgresql (foreman), httpd, puppetserver, foreman-proxy
\ starting postgresql (foreman)
postgresql (foreman) is remote and is UP.
\ All services started                                                [OK]
--------------------------------------------------------------------------------
Remove maintenance mode table/chain from nftables/iptables:           [OK]
--------------------------------------------------------------------------------
Clean up backup directory:                                            [OK]
--------------------------------------------------------------------------------

Done with backup: 2023-03-15 11:29:47 -0700
Backup didn't finish. Incomplete backup was removed.