From cda4be04a163eeea29da26df526e1037552120c0 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Wed, 11 Dec 2019 13:23:56 +0300 Subject: [PATCH] Fix condition when to store scopes from redis --- console/controllers/ManualMigrateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/controllers/ManualMigrateController.php b/console/controllers/ManualMigrateController.php index 00960ed..6dcaf6e 100644 --- a/console/controllers/ManualMigrateController.php +++ b/console/controllers/ManualMigrateController.php @@ -26,7 +26,7 @@ class ManualMigrateController extends Controller { /** @var OauthSession[] $sessions */ $sessions = OauthSession::find()->andWhere(['legacy_id' => $sessionsIds]); foreach ($sessions as $session) { - if (!empty($session->scopes)) { + if (empty($session->scopes)) { $session->scopes = Yii::$app->redis->smembers("oauth:sessions:{$session->legacy_id}:scopes"); Assert::true($session->save()); }