#29060: FirstOf with an 'as' clause  has confusing behaviour in all false case
---------------------------------+--------------------------------------
     Reporter:  Roger Gammans    |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Template system  |                  Version:  1.8
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by Roger Gammans:

Old description:

> I have verified this in version 1.8 and 2.0.
>
> firstof with an 'as' clause doesn't set; or reset the target context
> variable if all parameters are false. I would expect the context variable
> to be set to None or the empty string to match the replacement mode
> behaviour of the tag.
>
> As per summary.; Will add reference to a PR with a fix in while.

New description:

 I have verified this in version 1.8 and 2.0.

 firstof with an 'as' clause doesn't set; or reset the target context
 variable if all parameters are false. I would expect the context variable
 to be set to None or the empty string to match the replacement mode
 behaviour of the tag.

 As per summary.; Will add reference to a PR 9618 (
 https://github.com/django/django/pull/9618 ) has a fix and example
 unittest

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29060#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.71691dcd54070d20fd1eaf4fcccf9cc2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to