Fix for #21530

Correct AttributeError exception that occurs when one URL is specified in the urls.py.