openelections/dashboard — pull request #21 by ghing (2014-05-31 14:47:42+00:00)
Title: Don't set Log user to request.user

For some reason, when StateAdmin.save_formset is called with the
LogInline form instances, request.user is returned as
SimpleLazyObject instead of ProxyUser. This behavior is summarized
in this Stack Overflow answer:
http://stackoverflow.com/a/10507200/386210

When this is assigned to the user attribute of the Log instance and
the instance is saved, an error is thrown because the model expects
a ProxyUser object.

ElectionInline is not affected by this.

This works around the error by removing the auto assignment of
the currently logged in user to the user attribute of created
Log instances. This seems fine as the default form validation
requires the user field to be set when filling out the form
anyway.

Addresses https://github.com/openelections/dashboard/issues/20