MarkUsProject/Markus — pull request #1752 by zhangsu (2014-09-13 05:52:25+00:00)
Title: Fix error reporting bug when uploading group CSV

This patch deals with two issues:

1. flash data don't need to be "reset from previous errors". They are
automatically reset by Rails for each request. Manually setting it to
nil causes the current error reporting code to skip the
`if !flash.key?(type)` check because the key exists, but flash[type]
is still nil and will trigger an exception later.

2. It's safer to test nilness of flash data than to test the existence
of keys.

Tested:
- bundle exec rake test
- bundle exec rspec