Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » Bug: Issue with two threads with the same title

return:
MultipleObjectsReturned at /forum/thread/84/
get() returned more than one ThreadInformation -- it returned 2! Lookup parameters were {'root_post': <Post: dsfgdfg>}

hi,

i doubt that it's because of the same title .. there must be another reason ..
could you tell me the full stacktrace with line numbers ?

thanks,
herbert
Hey, we have Signatures !!! Great, isn't it ? ;)
Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in get_response
  82.                 response = callback(request, *callback_args, **callback_kwargs)
File "/home/narma/www/sphene/sphboard/views.py" in showThread
  130.     thread.viewed( request.session, request.user )
File "/home/narma/www/sphene/sphboard/models.py" in viewed
  757.             threadinfo = self.get_threadinformation()
File "/home/narma/www/sphene/sphboard/models.py" in get_threadinformation
  618.         return ThreadInformation.objects.type_default().get( root_post = self.get_thread() )
File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in get
  198.         raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"

Exception Type: MultipleObjectsReturned at /forum/thread/84/
Exception Value: get() returned more than one ThreadInformation -- it returned 2! Lookup parameters were {'root_post': <Post: dsfgdfg>}
It seems to me that the possible reason is there:
In 8: Post.objects.filter(subject='dsfgdfg').count()
Out8: 1L

In 9: ThreadInformation.objects.filter(root_post=p).count()
Out9: 2L

root_post should be unique for each thread. Am I right?

--- Last Edited by narma at 2008-06-02 06:06:14 ---
root_post should be unique for each thread. Am I right?
no, if you move a thread a second 'ThreadInformation' will be created... BUT .. only one ThreadInformation pointing to a specific root_post should have thread_type = THREAD_TYPE_DEFAULT

i have no idea how it could happen that there is more than one ThreadInformation with thread_type = THREAD_TYPE_DEFAULT and the same root_post ... is it the only one instance this occurred to you ? or can you somehow reproduce the problem with a new thread ?
Hey, we have Signatures !!! Great, isn't it ? ;)
Unfortunately, I'm not able to reproduce this issue.
I didn't move these Threads, but both ThreadInformation has same type.

Please login to post a reply.



Powered by Sphene Community Tools