| 431 | Bug #12239 |
| 432 | Float was being rounded to integer on gte queries on integer field. Tests |
| 433 | show that gt, lt, gte, and lte work as desired. Note that the fix changes |
| 434 | get_prep_lookup for gte queries only. |
| 435 | >>> Number.objects.filter(num__gt=11.9) |
| 436 | [<Number: 12>] |
| 437 | >>> Number.objects.filter(num__gt=12) |
| 438 | [] |
| 439 | >>> Number.objects.filter(num__gt=12.0) |
| 440 | [] |
| 441 | >>> Number.objects.filter(num__gt=12.1) |
| 442 | [] |
| 443 | >>> Number.objects.filter(num__lt=12) |
| 444 | [<Number: 4>, <Number: 8>] |
| 445 | >>> Number.objects.filter(num__lt=12.0) |
| 446 | [<Number: 4>, <Number: 8>] |
| 447 | >>> Number.objects.filter(num__lt=12.1) |
| 448 | [<Number: 4>, <Number: 8>, <Number: 12>] |
| 449 | >>> Number.objects.filter(num__gte=11.9) |
| 450 | [<Number: 12>] |
| 451 | >>> Number.objects.filter(num__gte=12) |
| 452 | [<Number: 12>] |
| 453 | >>> Number.objects.filter(num__gte=12.0) |
| 454 | [<Number: 12>] |
| 455 | >>> Number.objects.filter(num__gte=12.1) |
| 456 | [] |
| 457 | >>> Number.objects.filter(num__gte=12.9) |
| 458 | [] |
| 459 | >>> Number.objects.filter(num__lte=11.9) |
| 460 | [<Number: 4>, <Number: 8>] |
| 461 | >>> Number.objects.filter(num__lte=12) |
| 462 | [<Number: 4>, <Number: 8>, <Number: 12>] |
| 463 | >>> Number.objects.filter(num__lte=12.0) |
| 464 | [<Number: 4>, <Number: 8>, <Number: 12>] |
| 465 | >>> Number.objects.filter(num__lte=12.1) |
| 466 | [<Number: 4>, <Number: 8>, <Number: 12>] |
| 467 | >>> Number.objects.filter(num__lte=12.9) |
| 468 | [<Number: 4>, <Number: 8>, <Number: 12>] |
| 469 | |