City-of-Bloomington/open311-mobile — pull request #107 by g0ld2k (2013-03-03 03:29:05+00:00)
Title: Null object from dictionary fix

Corrects bug where a user submits a report without entering a description of the problem, the app crashes when getting the section header in the titleForHeaderInSection method.

The old code checks to see if the description entry exists in the request dictionary and if it doesn't the code tries to use the description value from the postdata dictionary.

The issue is that if the request dictionary has a description entry that is a NULL object, the current code does does not catch it. I'm not sure why checking if the entry is nil or exists doesn't work, but the only way I could fix the issue was to compare the id value returned from the dictionary to a NSNULL object.

The code also tried to use the description value from the postData dictionary if the request dictionary was empty. This is an issue when the description was not submitted because there is not a description key in the postData dictionary.