File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -611,7 +611,11 @@ def querystring_params(
611611def header_title (context : RequestContext ) -> str :
612612 parts = []
613613 opts = context .get ("opts" )
614- current_app = context .request .current_app
614+ current_app = (
615+ context .request .current_app
616+ if hasattr (context .request , "current_app" )
617+ else "admin"
618+ )
615619
616620 if opts :
617621 parts .append (
@@ -739,7 +743,11 @@ def header_title(context: RequestContext) -> str:
739743
740744@register .simple_tag (takes_context = True )
741745def admin_object_app_url (context : RequestContext , object : Model , arg : str ) -> str :
742- current_app = context .request .current_app
746+ current_app = (
747+ context .request .current_app
748+ if hasattr (context .request , "current_app" )
749+ else "admin"
750+ )
743751
744752 return f"{ current_app } :{ object ._meta .app_label } _{ object ._meta .model_name } _{ arg } "
745753
You can’t perform that action at this time.
0 commit comments