Opened 19 years ago

Closed 18 years ago

Last modified 18 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: 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 anonymous, 18 years ago

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 by Jacob, 18 years ago

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