mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Improved InitializeEntitiesIT destroy method to not delete none entity type
This commit is contained in:
@@ -25,6 +25,7 @@ import org.dspace.content.RelationshipType;
|
||||
import org.dspace.content.service.EntityTypeService;
|
||||
import org.dspace.content.service.RelationshipService;
|
||||
import org.dspace.content.service.RelationshipTypeService;
|
||||
import org.dspace.core.Constants;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -83,7 +84,9 @@ public class InitializeEntitiesIT extends AbstractControllerIntegrationTest {
|
||||
}
|
||||
|
||||
for (EntityType entityType: entityTypeList) {
|
||||
entityTypeService.delete(context, entityType);
|
||||
if (!Constants.ENTITY_TYPE_NONE.equals(entityType.getLabel())) {
|
||||
entityTypeService.delete(context, entityType);
|
||||
}
|
||||
}
|
||||
context.restoreAuthSystemState();
|
||||
|
||||
|
Reference in New Issue
Block a user