mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 11:26:13 +00:00
Monit, remove __items and fix migration issue (#3336)
This commit is contained in:
parent
33d687ae0b
commit
9746ebf8f1
@ -35,7 +35,7 @@ class M1_0_8 extends BaseModelMigration
|
||||
{
|
||||
public function post($model)
|
||||
{
|
||||
foreach ($model->getNodeByReference('test')->__items as $test) {
|
||||
foreach ($model->test->iterateItems() as $test) {
|
||||
$test->type = $model->getTestType($test->condition->getNodeData());
|
||||
}
|
||||
// validation will fail because we want to change the type of tests linked to services
|
||||
|
||||
@ -168,7 +168,8 @@ class Monit extends BaseModel
|
||||
switch ($node->getInternalXMLTagName()) {
|
||||
case 'type':
|
||||
$testUuid = $parentNode->getAttribute('uuid');
|
||||
if ($node->isFieldChanged() &&
|
||||
if (strcmp((string)$node, 'Custom') != 0 &&
|
||||
$node->isFieldChanged() &&
|
||||
$this->isTestServiceRelated($testUuid)) {
|
||||
$messages->appendMessage(new \Phalcon\Validation\Message(
|
||||
gettext("Cannot change the type. Test is linked to a service."),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user