Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#1898 closed defect (wontfix)

unique=True does not work for ImageField

Reported by: mdt@… Owned by: adrian
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: UI/UX:


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 9 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 9 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to 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.
Back to Top