Update models.py

Fixed save method for components.