Update views.py

noted race condition to fix