Update models.py

Fixed bug where changing a grade with a marking period would not save if a override was present