wpjunior/django-mongotools — pull request #13 by Uznick (2012-08-24 11:17:37+00:00)
Title: Fixed the exception on cleaning the ReferenceField

Fixed exception:

Stacktrace (most recent call last):

File "django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "django/views/generic/base.py", line 48, in view
return self.dispatch(request, *args, **kwargs)

File "django/views/generic/base.py", line 69, in dispatch
return handler(request, *args, **kwargs)

File "constructor/apps/admin/views.py", line 25, in post
next = super(ChangelogMixin, self).post(request, *args, **kwargs)

File "mongotools/views/__init__.py", line 255, in post
return super(BaseUpdateView, self).post(request, *args, **kwargs)

File "django/views/generic/edit.py", line 137, in post
if form.is_valid():

File "django/forms/forms.py", line 124, in is_valid
return self.is_bound and not bool(self.errors)

File "django/forms/forms.py", line 115, in _get_errors
self.full_clean()

File "django/forms/forms.py", line 270, in full_clean
self._clean_fields()

File "django/forms/forms.py", line 287, in _clean_fields
value = field.clean(value)

File "mongotools/forms/utils.py", line 23, in inner_validate
value = old_clean(value)

File "mongotools/forms/fields.py", line 93, in clean
oid = ObjectId(value)