Fix minor code error in Generic Views documentation - missing `if` statement.
Merge pull request #818 from hamishcampbell/master

Very minor documentation code fix.