From 86e489bde138cea6675532adbf2422a499a3279f Mon Sep 17 00:00:00 2001 From: Dimitris Spachos Date: Fri, 12 Apr 2024 13:00:18 +0300 Subject: [PATCH] feat(slb-146): add form session id on get form state condition (optional) --- .../src/Storage/AutosaveEntityFormDatabaseStorage.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php b/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php index 7ab4b5576..0098464b7 100644 --- a/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php +++ b/packages/drupal/silverback_autosave/src/Storage/AutosaveEntityFormDatabaseStorage.php @@ -169,10 +169,9 @@ public function getFormState($form_id, $entity_type_id, $entity_id, $langcode, $ ->orderBy('timestamp', 'DESC') ->condition('form_id', $form_id); - // Use this for future restore state. - /* if (isset($form_session_id)) { - $query->condition('form_session_id', $form_session_id); - } */ + if (isset($form_session_id)) { + $query->condition('form_session_id', $form_session_id); + } $query->condition('entity_type_id', $entity_type_id) ->condition('entity_id', $entity_id)