Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#32139 closed Cleanup/optimization (worksforme)

Add check, that raise TemplateException, when argument 'only' provided more then once in tag 'include'

Reported by: Mikhail Fesenko Owned by: nobody
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mikhail Fesenko)

https://github.com/django/django/pull/13597

I've added code with this fix, and test for it

Change History (5)

comment:1 by Mikhail Fesenko, 4 years ago

Has patch: set

comment:2 by Jacob Walls, 4 years ago

Description: modified (diff)
Type: UncategorizedCleanup/optimization

comment:3 by Jacob Walls, 4 years ago

Resolution: worksforme
Status: newclosed

Hi Mikhail, thanks for this contribution, but the test you submitted passes without your patch. Further, I don't see how your patch would execute since if option in options raises an exception a few lines above. Finally, and for the same reason, I don't think the test you provided meaningfully increases coverage since there are test methods test_variable_twice() and test_syntax_error_duplicate_option() that already test this.

comment:4 by Mikhail Fesenko, 4 years ago

Description: modified (diff)

Wow, I made a mistake =(
Idk why, when I did this patch, I thought that if option in options: was only for 'with' param, idk why

comment:5 by Mikhail Fesenko, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top