File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 2727
2828class InertiaRequest (HttpRequest ):
2929 def __init__ (self , request ):
30- self .request = request
31-
32- def __getattr__ (self , name ):
33- return getattr (self .request , name )
30+ super ().__init__ ()
31+ self .__dict__ .update (request .__dict__ )
3432
3533 @property
3634 def headers (self ):
37- return self . request .headers
35+ return super () .headers
3836
3937 @property
4038 def inertia (self ):
41- return self .request .inertia .all () if hasattr (self .request , "inertia" ) else {}
39+ inertia_attr = self .__dict__ .get ("inertia" )
40+ return (
41+ inertia_attr .all () if inertia_attr and hasattr (inertia_attr , "all" ) else {}
42+ )
4243
4344 def is_a_partial_render (self , component ):
4445 return (
@@ -58,7 +59,7 @@ def is_inertia(self):
5859 def should_encrypt_history (self ):
5960 return validate_type (
6061 getattr (
61- self . request ,
62+ self ,
6263 INERTIA_REQUEST_ENCRYPT_HISTORY ,
6364 settings .INERTIA_ENCRYPT_HISTORY ,
6465 ),
You can’t perform that action at this time.
0 commit comments