mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
Bug fix in determining if a Format Registry entry already exists. Also check for short description.
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user