Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1898 closed defect (wontfix)

unique=True does not work for ImageField

Reported by: mdt@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: master
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


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 Changed 13 years ago by anonymous

I'm curious, how would you determine the uniqueness of an image? The filename doesn't seem like a good choice to me.

comment:2 Changed 13 years ago by Jacob

Resolution: wontfix
Status: newclosed

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.
Back to Top