attribute error exception catching on displaying a favorite object that is no longer in the database