[PATCH 23 of 24 Openidrelay cube] Fix: '<' not supported between instances of 'type' and 'type'

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 09:54:06 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585507988 0
#      Sun Mar 29 18:53:08 2020 +0000
# Node ID 55d1872e017c232ceee5e6f5f92e2c1b1eda4958
# Parent  d3f9d2f62d025423f230e03576ee6ec0a6d65c70
Fix: '<' not supported between instances of 'type' and 'type'

diff --git a/cubicweb_openidrelay/views.py b/cubicweb_openidrelay/views.py
--- a/cubicweb_openidrelay/views.py
+++ b/cubicweb_openidrelay/views.py
@@ -310,7 +310,7 @@
         if score > 0:
             objects.append((score, appobject))
     return [obj(*args, **kwargs)
-            for _score, obj in sorted(objects)]
+            for _score, obj in sorted(objects, key=lambda x: x[0])]
 
 
 # XXX jQuery.OpenID ?




More information about the cubicweb-devel mailing list