diff --git a/databox/api/src/Controller/Admin/WorkspaceSecretCrudController.php b/databox/api/src/Controller/Admin/WorkspaceSecretCrudController.php index 57b05136f..d15492fc4 100644 --- a/databox/api/src/Controller/Admin/WorkspaceSecretCrudController.php +++ b/databox/api/src/Controller/Admin/WorkspaceSecretCrudController.php @@ -47,5 +47,7 @@ public function configureFields(string $pageName): iterable ->onlyOnForms(); yield DateTimeField::new('createdAt') ->hideOnForm(); + yield DateTimeField::new('updatedAt') + ->hideOnForm(); } } diff --git a/databox/api/src/Entity/Integration/WorkspaceSecret.php b/databox/api/src/Entity/Integration/WorkspaceSecret.php index 6133b42af..7b6eba227 100644 --- a/databox/api/src/Entity/Integration/WorkspaceSecret.php +++ b/databox/api/src/Entity/Integration/WorkspaceSecret.php @@ -63,5 +63,8 @@ public function getPlainValue(): ?string public function setPlainValue(?string $plainValue): void { $this->plainValue = $plainValue; + if (null !== $plainValue) { + $this->setValue(null); // Make a change to this mapped field trigger Doctrine preUpdate event + } } }