dominno / django-moderation

django-moderation is reusable application for Django framework, that allows to moderate any model objects.
BSD 3-Clause "New" or "Revised" License
269 stars 90 forks source link

DeserializationError at /admin/moderation/moderatedobject/ #96

Closed skizzy closed 4 years ago

skizzy commented 10 years ago

Hello,

Thanks for creating this package. After installation, the moderation is working. When I visited the admin page, I'm getting the below error:

[u"'(+: (DEFAULT: ), 1)' value must be an integer."]

Environment:

Request Method: GET
Request URL: http://mysell:8000/admin/moderation/moderatedobject/

Django Version: 1.4.6
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
 'digiapp',
 'registration',
  'profile',
  'tinymce',
   'moderation')
  Installed Middleware:
  ('django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware')

  Traceback:
     File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
         111.                         response = callback(request, *callback_args, **callback_kwargs)
          File "C:\Python27\lib\site-packages\django\contrib\admin\options.py" in wrapper
          366.                 return self.admin_site.admin_view(view)(*args, **kwargs)

File "C:\Python27\lib\site-packages\django\utils\decorators.py" in _wrapped_view

  1. response = view_func(request, _args, *_kwargs) File "C:\Python27\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
    1. response = view_func(request, _args, *_kwargs) File "C:\Python27\lib\site-packages\django\contrib\admin\sites.py" in inner
    2. return view(request, _args, *_kwargs) File "C:\Python27\lib\site-packages\django\utils\decorators.py" in _wrapper
  2. return bound_func(_args, *_kwargs) File "C:\Python27\lib\site-packages\django\utils\decorators.py" in _wrapped_view
    1. response = view_func(request, _args, *_kwargs) File "C:\Python27\lib\site-packages\django\utils\decorators.py" in bound_func
      1. return func(self, _args2, *_kwargs2) File "C:\Python27\lib\site-packages\django\contrib\admin\options.py" in changelist_view
    2. 'selectionnote': ('0 of %(cnt)s selected') % {'cnt': len(cl.result_list)}, File "C:\Python27\lib\site-packages\django\db\models\query.py" in len
      1. self._result_cache = list(self.iterator()) File "C:\Python27\lib\site-packages\django\db\models\query.py" in iterator
        1. offset=len(aggregate_select)) File "C:\Python27\lib\site-packages\django\db\models\query.py" in get_cached_row
          1. obj = klass(*fields) File "C:\Python27\lib\site-packages\django_moderation-0.3.2-py2.7.egg\moderation\models.py" in init
    3. super(ModeratedObject, self).init(_args, *_kwargs) File "C:\Python27\lib\site-packages\django\db\models\base.py" in init
      1. signals.post_init.send(sender=self.class, instance=self) File "C:\Python27\lib\site-packages\django\dispatch\dispatcher.py" in send
        1. response = receiver(signal=self, sender=sender, **named) File "C:\Python27\lib\site-packages\django_moderation-0.3.2-py2.7.egg\moderation\fields.py" in post_init
  3. self._deserialize(value)) File "C:\Python27\lib\site-packages\django_moderation-0.3.2-py2.7.egg\moderation\fields.py" in _deserialize
    1. obj = obj_generator.next().object File "C:\Python27\lib\site-packages\django\core\serializers\json.py" in Deserializer
  4. raise DeserializationError(e)
           Exception Type: DeserializationError at /admin/moderation/moderatedobject/
          Exception Value: [u"'(+: (DEFAULT: ), 1)' value must be an integer."]
DmytroLitvinov commented 4 years ago

Try to use new version of django-moderation which is 0.7.0 and let us know if you have the same result.