Posted by narma |
|
return:
MultipleObjectsReturned at /forum/thread/84/ get() returned more than one ThreadInformation -- it returned 2! Lookup parameters were {'root_post': <Post: dsfgdfg>} |
|
Posted by Herbert Poul |
|
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 ? ;) |
|
Posted by narma |
|
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 --- |
|
Posted by Herbert Poul |
|
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 ? ;) |
|
Posted by narma |
|
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.