usnistgov / SpectrumBrowser

ITL
12 stars 11 forks source link

If there is no LTE or radar data, cannot login. #139

Closed jkubNTIA closed 9 years ago

jkubNTIA commented 9 years ago

If I delete all LTE & radar data, I cannot login to the website. Here is my stack trace: Log Message : URL = http://localhost:8000/spectrumbrowser/getLocationInfo/user-142677429308038458295 updated session ID expireTime getLocationInfo Unexpected error: <type 'exceptions.TypeError'> (<type 'exceptions.TypeError'>, TypeError("'NoneType' object does not support item deletion",), <traceback object at 0x7f44346d4290>) Traceback (most recent call last): File "/home/jkub/Documents/SpectrumBrowser/flask/GetLocationInfo.py", line 31, in getLocationInfo del systemMessage["_id"] TypeError: 'NoneType' object does not support item deletion Unexpected error: <type 'exceptions.TypeError'> (<type 'exceptions.TypeError'>, TypeError("'NoneType' object does not support item deletion",), <traceback object at 0x7f44346d4518>) Traceback (most recent call last): File "/home/jkub/Documents/SpectrumBrowser/flask/flaskr.py", line 1144, in getLocationInfo retval=GetLocationInfo.getLocationInfo() File "/home/jkub/Documents/SpectrumBrowser/flask/GetLocationInfo.py", line 31, in getLocationInfo del systemMessage["_id"] TypeError: 'NoneType' object does not support item deletion Log Message : Error in processing request

ranganathanm commented 9 years ago

This is expected. If there is no data to see there is no point in logging in. However, I agree that the NoneType is ugly so I'll fix that.

ranganathanm commented 9 years ago

Fixed on master 337cdf0..ca4cfb6

ranganathanm commented 9 years ago

Please retest. thanks.

ranganathanm commented 9 years ago

Self verified as Julie did not verify this after a few months.