﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22877	Segfault when converting objects.prefetch_related into boolean condition.	maxime.blanchemain@…	nobody	"Hi, 
Lets take the following models:
#models.py
class Item()
class UserProfile()
class Appreciation(models.Model):
    item = models.ForeignKey(Item,
                              verbose_name=_('item_appreciations'),
                              related_name='item_appreciation')
    user_profile = models.ForeignKey(
        UserProfile, verbose_name=_('user profile'), related_name='user_profile_appreciation'
    )

####
With a populated database, the following line trigger a Segmentation fault:
#Main.py
if Item.objects.prefetch_related('item_appreciation'):
    print 'lol'





"	Uncategorized	new	Core (Other)	1.6	Normal		Segmentation Fault,		Unreviewed	0	0	0	0	0	0
