#1898 closed defect (wontfix)
unique=True does not work for ImageField
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
if you set uniq=True for an ImageField you get the error 'Error
binding parameter 0 - probably unsupported type.' when saving.
Change History (2)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
I think by definition ImageFields are unique; even if you upload the same image twice you'll still end up with two unique files. And checking the files just seems silly to me. Marking wontfix.
Note:
See TracTickets
for help on using tickets.
I'm curious, how would you determine the uniqueness of an image? The filename doesn't seem like a good choice to me.