Update networks.py

Fix error 500 when click on autoscan network.