diff --git a/django_plotly_dash/_patches.py b/django_plotly_dash/_patches.py
index 43ad594a1628c8dce01cb4923899bf27609ac611..cb932d7ba9d14b7f2d7cc6dfea9c29c47fa50c2b 100644
--- a/django_plotly_dash/_patches.py
+++ b/django_plotly_dash/_patches.py
@@ -108,7 +108,7 @@ def to_json_django_plotly(plotly_object, pretty=False, engine=None):
 
         return json.dumps(plotly_object, cls=DjangoPlotlyJSONEncoder, **opts)
     elif engine == "orjson":
-        JsonConfig.validate_orjson()
+        config.validate_orjson()
         opts = orjson.OPT_NON_STR_KEYS | orjson.OPT_SERIALIZE_NUMPY
 
         if pretty: