forked from pool/python-sortinghat
- Update to 1.5.1:
* Update Poetry dependencies. - Add patch support-new-django-graphql-jwt.patch: * Stop calling a now removed method in new django-graphql-jwt. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sortinghat?expand=0&rev=48
This commit is contained in:
24
support-new-django-graphql-jwt.patch
Normal file
24
support-new-django-graphql-jwt.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
Index: grimoirelab-sortinghat-1.5.1/sortinghat/core/middleware.py
|
||||
===================================================================
|
||||
--- grimoirelab-sortinghat-1.5.1.orig/sortinghat/core/middleware.py
|
||||
+++ grimoirelab-sortinghat-1.5.1/sortinghat/core/middleware.py
|
||||
@@ -16,7 +16,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.http import Http404
|
||||
-from graphql_jwt.compat import get_operation_name
|
||||
from graphql_jwt.settings import jwt_settings
|
||||
|
||||
from . import tenant
|
||||
@@ -27,7 +26,10 @@ def allow_any(info, **kwargs):
|
||||
# "How to solve 'NoneType' object has no attribute 'fields' in
|
||||
# Graphene-django" (https://stackoverflow.com/a/71296685).
|
||||
try:
|
||||
- operation_name = get_operation_name(info.operation.operation).title()
|
||||
+ if hasattr(info.operation.operation, 'value'):
|
||||
+ operation_name = info.operation.operation.value.title()
|
||||
+ else:
|
||||
+ operation_name = info.operation.operation.title()
|
||||
operation_type = info.schema.get_type(operation_name)
|
||||
|
||||
if hasattr(operation_type, 'fields'):
|
Reference in New Issue
Block a user