Forum OpenACS Q&A: Result more than one row in cr_content_mime_type_map for a mime type

dbqd.acs-content-repository.tcl.revision-procs.cr_registered_type_for_mime_type.registered_type_for_mime_type

select content_type
from cr_content_mime_type_map
where mime_type = :mime_type

Returns two entries for 'image/jpeg': content_revision and image. Any idea what is correct and what should be removed?

Both are correct, the table does not have a unique constraint.

The code that relies on there only being one row is incorrect.

This was fixed in file-storage and acs-content-repository awhile ago. CVS web browser is down right now or I would link to the diffs.

Check revision-procs.tcl for cr_import_content and you should see the change in the latest version for sure.