In line 386, origin is named "upstream", but in line 408 it was called "origin".
Fully adapt this script to using dnf instead of yum on Fedora.