From 59f5a4e19be43036c97184a9ac87c303a26dfba9 Mon Sep 17 00:00:00 2001
From: Jana Cupova <root@localhost>
Date: Feb 07 2023 12:13:17 +0000
Subject: Fix unlogging session


Fixes: https://pagure.io/koji/issue/3394

---

diff --git a/koji/__init__.py b/koji/__init__.py
index a6208d0..756b9f6 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -2770,7 +2770,7 @@ class ClientSession(object):
         except AuthExpired:
             # this can happen when an exclusive session is forced
             pass
-        if session_id == self.sinfo['session-id']:
+        if not session_id or session_id == self.sinfo['session-id']:
             self.setSession(None)
 
     def _forget(self):

