Move delete metas in if clause

[MAILPOET-4966]
This commit is contained in:
David Remer
2023-02-20 09:44:28 +02:00
committed by Aschepikov
parent 4a49143422
commit 1ddf69b490

View File

@@ -66,8 +66,8 @@ class UpdateAutomationController {
}
}
$automation->deleteAllMetas();
if (array_key_exists('meta', $data)) {
$automation->deleteAllMetas();
foreach ($data['meta'] as $key => $value) {
$automation->setMeta($key, $value);
}