1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Monkey-patch Django's force_text in lieu of graphene-django 2.16 release

This commit is contained in:
jeremystretch
2022-04-01 10:15:45 -04:00
parent 7fff1e6fe5
commit e2b6d69596
2 changed files with 8 additions and 2 deletions

View File

@ -14,6 +14,13 @@ from django.core.validators import URLValidator
from netbox.config import PARAMS
# Monkey patch to fix Django 4.0 support for graphene-django (see
# https://github.com/graphql-python/graphene-django/issues/1284)
# TODO: Remove this when graphene-django 2.16 becomes available
import django
from django.utils.encoding import force_str
django.utils.encoding.force_text = force_str
#
# Environment setup