Bug fix in determining if a Format Registry entry already exists. Also check for short description.

This commit is contained in:
Tim Donohue
2014-10-23 17:16:23 -05:00
parent 5674474c2c
commit c868cb20db

View File

@@ -169,6 +169,12 @@ public class RegistryLoader
// Check if this format already exists in our registry (by mime type) // Check if this format already exists in our registry (by mime type)
BitstreamFormat exists = BitstreamFormat.findByMIMEType(context, mimeType); BitstreamFormat exists = BitstreamFormat.findByMIMEType(context, mimeType);
// If not found by mimeType, check by short description (since this must also be unique)
if(exists==null)
{
exists = BitstreamFormat.findByShortDescription(context, shortDesc);
}
// If it doesn't exist, create it..otherwise skip it. // If it doesn't exist, create it..otherwise skip it.
if(exists==null) if(exists==null)
{ {