From 0152307440b709f6fde0baeb426031d599d91a38 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas@kluyver.me.uk>
Date: Tue, 1 Aug 2023 17:15:36 +0100
Subject: [PATCH] Fix picking when to use Oauth

---
 src/cal_tools/calcat_interface2.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cal_tools/calcat_interface2.py b/src/cal_tools/calcat_interface2.py
index 23d3b21f1..9f387caa1 100644
--- a/src/cal_tools/calcat_interface2.py
+++ b/src/cal_tools/calcat_interface2.py
@@ -23,7 +23,7 @@ def get_client():
 def setup_client(base_url, client_id, client_secret, user_email, **kwargs):
     global global_client
     global_client = CalibrationClient(
-        use_oauth2=(client_id is None),
+        use_oauth2=(client_id is not None),
         client_id=client_id,
         client_secret=client_secret,
         user_email=user_email,
-- 
GitLab