From 033b46b360bc10b9125667b3daf55788445e12e5 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Sun, 31 May 2020 19:05:57 +0200 Subject: [PATCH] fix crdb support by casting uuid Postgres seems to happily take in and automatically cast uuid type values into varchar columns. This is not the case with cockroachdb. --- sso/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sso/views.py b/sso/views.py index 5b2cd71..2da5c41 100644 --- a/sso/views.py +++ b/sso/views.py @@ -82,7 +82,7 @@ def client_create(): if form.validate_on_submit(): client = Client() - client.client_id = uuid.uuid4() + client.client_id = str(uuid.uuid4()) client.client_secret = generate_token() client.owner_id = current_user.get_user_id() client.set_client_metadata(form.data)