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:
parent
12fbfd5a9e
commit
aaa0409908
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user