Fix example for S611 (#16316)

## Summary

* Existing example did not include RawSQL() call like it should
* Also clarify the example a bit to make it clearer that the code is not
secure
## Test Plan

N/A, only documentation updated
This commit is contained in:
Ari Pollak 2025-02-22 14:15:29 -05:00 committed by GitHub
parent 64effa4aea
commit aa88f2dbe5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ use crate::checkers::ast::Checker;
/// from django.db.models.expressions import RawSQL /// from django.db.models.expressions import RawSQL
/// from django.contrib.auth.models import User /// from django.contrib.auth.models import User
/// ///
/// User.objects.annotate(val=("%secure" % "nos", [])) /// User.objects.annotate(val=RawSQL("%s" % input_param, []))
/// ``` /// ```
/// ///
/// ## References /// ## References