mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed failing unit test
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@64666 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -187,10 +187,8 @@ public class HoldServiceImpl implements HoldService, RecordsManagementModel
|
|||||||
// Apply the freeze aspect
|
// Apply the freeze aspect
|
||||||
props.put(PROP_FROZEN_AT, new Date());
|
props.put(PROP_FROZEN_AT, new Date());
|
||||||
props.put(PROP_FROZEN_BY, AuthenticationUtil.getFullyAuthenticatedUser());
|
props.put(PROP_FROZEN_BY, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||||
boolean hasFrozenAspect = nodeService.hasAspect(nodeRef, ASPECT_FROZEN);
|
|
||||||
|
|
||||||
|
if (!nodeService.hasAspect(nodeRef, ASPECT_FROZEN))
|
||||||
if (!hasFrozenAspect)
|
|
||||||
{
|
{
|
||||||
nodeService.addAspect(nodeRef, ASPECT_FROZEN, props);
|
nodeService.addAspect(nodeRef, ASPECT_FROZEN, props);
|
||||||
|
|
||||||
@@ -209,7 +207,7 @@ public class HoldServiceImpl implements HoldService, RecordsManagementModel
|
|||||||
for (NodeRef record : records)
|
for (NodeRef record : records)
|
||||||
{
|
{
|
||||||
// no need to freeze if already frozen!
|
// no need to freeze if already frozen!
|
||||||
if (!hasFrozenAspect)
|
if (!nodeService.hasAspect(record, ASPECT_FROZEN))
|
||||||
{
|
{
|
||||||
nodeService.addAspect(record, ASPECT_FROZEN, props);
|
nodeService.addAspect(record, ASPECT_FROZEN, props);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user