Fixing "AttributeError: 'module' object has no attribute 'id'".

Currently running python manage.py tests fails with
FAILED (failures=1, errors=5, skipped=3)
One of those errors is due to a typo in a local variable. Fixing and removing trailing
whitespaces present in the file.