Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -286,8 +286,11 @@ public class JpaDistributionSetManagement implements DistributionSetManagement {
|
||||
update.getDescription().ifPresent(set::setDescription);
|
||||
update.getVersion().ifPresent(set::setVersion);
|
||||
|
||||
if (Boolean.TRUE.equals(update.getLocked()) && !set.isLocked()) {
|
||||
// lock/unlock ONLY if locked flag is present!
|
||||
if (Boolean.TRUE.equals(update.locked())) {
|
||||
set.lock();
|
||||
} else if (Boolean.FALSE.equals(update.locked())) {
|
||||
set.unlock();
|
||||
}
|
||||
|
||||
if (update.isRequiredMigrationStep() != null
|
||||
|
||||
@@ -142,8 +142,12 @@ public class JpaSoftwareModuleManagement implements SoftwareModuleManagement {
|
||||
|
||||
update.getDescription().ifPresent(module::setDescription);
|
||||
update.getVendor().ifPresent(module::setVendor);
|
||||
if (Boolean.TRUE.equals(update.getLocked()) && !module.isLocked()) {
|
||||
|
||||
// lock/unlock ONLY if locked flag is present!
|
||||
if (Boolean.TRUE.equals(update.locked())) {
|
||||
module.lock();
|
||||
} else if (Boolean.FALSE.equals(update.locked())) {
|
||||
module.unlock();
|
||||
}
|
||||
|
||||
return softwareModuleRepository.save(module);
|
||||
|
||||
Reference in New Issue
Block a user