удаление инфы о тестах при удалении группы из конфиги
This commit is contained in:
@@ -144,7 +144,6 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
Utils_.forceDeleteWithCheck(test.getArchive());
|
||||
Utils_.forceDeleteWithCheck(test.getServerPath());
|
||||
//--
|
||||
//-
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
if (dvmConfiguration.tryDeleteTest(test)) {
|
||||
db.Update(dvmConfiguration);
|
||||
@@ -156,32 +155,31 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
}
|
||||
}
|
||||
//--
|
||||
} else if (object instanceof Group) {
|
||||
}
|
||||
else if (object instanceof Group) {
|
||||
Group group = (Group) object;
|
||||
Vector<Test> tests = new Vector<>();
|
||||
for (Test group_test : db.tests.Data.values()) {
|
||||
if (group_test.group_id == group.id)
|
||||
tests.add(group_test);
|
||||
}
|
||||
for (Test group_test : tests) {
|
||||
db.Delete(group_test);
|
||||
Utils_.forceDeleteWithCheck(group_test.getArchive());
|
||||
Utils_.forceDeleteWithCheck(group_test.getServerPath());
|
||||
}
|
||||
LinkedHashMap<Integer, Test> groupTests = db.getMapByFKi(group, Test.class);
|
||||
//--
|
||||
for (DVMConfiguration dvmConfiguration : db.dvmConfigurations.Data.values()) {
|
||||
if (dvmConfiguration.tryDeleteGroup(group)) {
|
||||
//todo удалить все тесты связанные с группой из конфигурации
|
||||
dvmConfiguration.tryDeleteTests(groupTests);
|
||||
db.Update(dvmConfiguration);
|
||||
}
|
||||
}
|
||||
for (SapforConfiguration sapforConfiguration : db.sapforConfigurations.Data.values()) {
|
||||
if (sapforConfiguration.tryDeleteGroup(group)) {
|
||||
//todo удалить все тесты связанные с группой из конфигурации
|
||||
sapforConfiguration.tryDeleteTests(groupTests);
|
||||
db.Update(sapforConfiguration);
|
||||
}
|
||||
}
|
||||
//--
|
||||
for (Test group_test : groupTests.values()) {
|
||||
db.Delete(group_test);
|
||||
Utils_.forceDeleteWithCheck(group_test.getArchive());
|
||||
Utils_.forceDeleteWithCheck(group_test.getServerPath());
|
||||
}
|
||||
|
||||
//--
|
||||
} else if (object instanceof ServerSapfor) {
|
||||
Utils_.forceDeleteWithCheck(
|
||||
new File(
|
||||
|
||||
Reference in New Issue
Block a user