#24489 closed Uncategorized (invalid)
PositiveIntegerField accepting Negatives
Reported by: | projectgoav | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Normal | Keywords: | Models Fields PositiveIntegerField |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The PositiveIntegerField seems to accept negative values when tested
Full Problem: StackOverflow
Change History (1)
comment:1 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version 0, edited 10 years ago by (next)
Note:
See TracTickets
for help on using tickets.
I'm marking this as invalid:
post.views
will always be-10
instead of the actual database value. For MySQL and probably other backends, the value is correctly set to0
when reloaded from the database.So while it might be semantically incorrect to support negative values, it's not a bug, and changing it would be backwards-incompatible. Feel free to add a note to the documentation, though.