mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Revert "handle empty snapshot correctly"
This reverts commit 99f985783e960d1ef8712c8ff724862f688b461e.
This commit is contained in:
parent
9225e8d2d4
commit
2f1e5504fb
@ -750,7 +750,7 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
||||
SnapshotVO snapshot = _snapshotDao.findById(snapshotId);
|
||||
if (snapshot.getBackupSnapshotId() != null) {
|
||||
List<SnapshotVO> snaps = _snapshotDao.listByBackupUuid(snapshot.getVolumeId(), snapshot.getBackupSnapshotId());
|
||||
if ( snaps != null && snaps.size() > 1 ) {
|
||||
if (!snaps.isEmpty()) {
|
||||
snapshot.setBackupSnapshotId(null);
|
||||
_snapshotDao.update(snapshot.getId(), snapshot);
|
||||
}
|
||||
@ -787,7 +787,7 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
||||
String BackupSnapshotId = lastSnapshot.getBackupSnapshotId();
|
||||
if (BackupSnapshotId != null) {
|
||||
List<SnapshotVO> snaps = _snapshotDao.listByBackupUuid(lastSnapshot.getVolumeId(), BackupSnapshotId);
|
||||
if ( snaps != null && snaps.size() > 1) {
|
||||
if (snaps != null && !snaps.isEmpty()) {
|
||||
lastSnapshot.setBackupSnapshotId(null);
|
||||
_snapshotDao.update(lastSnapshot.getId(), lastSnapshot);
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user