Upgrade to Foreman 3.11 failed with error

With this workaround the installation was successful. Foreman upgrade issue from 2.5.4 to 3.0.1 - #3 by Sergey