1
0
mirror of https://github.com/altlinux/admc.git synced 2025-03-28 18:50:45 +03:00

fix create dialog failing on success

while applying edits, the total success bool flag wasn't initialized
\ so it defaulted to false, and even though all apply's succeeded, f-n
\ returned false
This commit is contained in:
Dmitry Degtyarev 2021-02-03 13:28:50 +04:00
parent 12fbfd5a9e
commit aaa0409908

View File

@ -242,15 +242,16 @@ void CreateDialog::accept() {
if (add_success) {
const bool apply_success =
[=]() {
bool out;
bool total_success = true;
for (auto edit : all_edits) {
const bool success = edit->apply(dn);
if (!success) {
out = false;
total_success = false;
}
}
return out;
return total_success;
}();
if (apply_success) {