#36998: firstof tag doesn't require an argument when used with as var
---------------------------------+-------------------------------------
     Reporter:  Lily             |                    Owner:  Shubh Rai
         Type:  Bug              |                   Status:  assigned
    Component:  Template system  |                  Version:  6.0
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  1                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  1
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-------------------------------------
Comment (by Vaibhav Pant):

 Hey , I'm a beginner open source contributor and I've been looking into
 this ticket. I went through the previous PRs and the review comments to
 understand what went wrong earlier.

 I've implemented the fix — adding a check inside the `as` parsing block
 that raises a `TemplateSyntaxError` with the message `"'firstof' statement
 requires at least one argument before 'as'"` when no variables are
 provided before `as`.

 I also added a regression test following the same `@setup` pattern used in
 the existing test file, taking reference from how the earlier patch
 approached testing. All 17 tests are passing locally.

 I would love to open a PR for this if it's okay. Please let me know if
 there's anything I should fix or change before I do!
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36998#comment:10>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e1a42e0a4-5f119497-3e07-40b9-aa0b-f41c67faaa8b-000000%40eu-central-1.amazonses.com.

Reply via email to