move context after condition

This commit is contained in:
Michael Hoennig 2024-08-08 09:51:34 +02:00
parent b49b10ec15
commit a06bdf6169

View File

@ -797,8 +797,8 @@ public class ImportHostingAssets extends ImportOfficeData {
jpaAttempt.transacted(() ->
hostingAssets.forEach((key, ha) -> {
context(rbacSuperuser); // if put only outside the loop, it seems to get lost after a while, no idea why
if (hsHostingAssetTypeSet.contains(ha.getType())) {
context(rbacSuperuser); // if put only outside the loop, it seems to get lost after a while, no idea why
logError(() ->
new HostingAssetEntitySaveProcessor(em, ha)
.preprocessEntity()