﻿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
25600	Template `if` tag behavior change with 1.8, OneToOneField, RelatedObjectDoesNotExist is True?	Denis Cornehl	nobody	"We discovered a strange behavior change when upgrading from Django 1.7 to 1.8. 

Let's assume we have a {{{OneToOneField}}} like here:

{{{#!python
class Customer(models.Model):
    name = models.CharField(max_length=100)


class Project(models.Model):
    customer = models.OneToOneField(Customer)
    title = models.CharField(max_length=100)
}}}

the template gets the {{{Customer}}} instance, without a project, in the context. 

{{{
{% if customer.project %}
    {# on 1.8 we get here #}
{% else %}
    {# on 1.7 we get here #}
{% endif %}
}}}

when debugging and trying to access {{{customer.project}}} in a django shell, we get a {{{RelatedObjectDoesNotExist}}} in both versions, so this does not seem to have changed. 

So to us it looks like the behavior of the {{{if}}} tag in templates changed. 

I'm happy to provide more info as needed, or test stuff. Or even write a PR / Fix if someone points me to possible places where this could have been changed / broken. "	Bug	new	Template system	1.8	Normal			felisiak.mariusz@…	Accepted	0	0	0	0	0	0
