Ticket #17974: distinct_patch.txt
| File distinct_patch.txt, 545 bytes (added by , 14 years ago) |
|---|
| Line | |
|---|---|
| 1 | Index: django/db/backends/__init__.py |
| 2 | =================================================================== |
| 3 | --- django/db/backends/__init__.py (revision 17806) |
| 4 | +++ django/db/backends/__init__.py (working copy) |
| 5 | @@ -568,7 +568,7 @@ |
| 6 | result set. If any fields are given, only the given fields are being |
| 7 | checked for duplicates. |
| 8 | """ |
| 9 | - if fields: |
| 10 | + if not fields: |
| 11 | raise NotImplementedError('DISTINCT ON fields is not supported by this database backend') |
| 12 | else: |
| 13 | return 'DISTINCT' |