Extending a view class with an operation ID does not cause a system check error #702
Labels
bug
Something isn't working
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
Describe the bug
Using
@extend_schema
on an view class with anoperation_id
results in an error being displayed on almost everymanage.py
command, yet the deploy check does not show any error, neither does a request on a SchemaView. This makes the issue undetectable in a CI job.To Reproduce
Create an APIView class that uses
@extend_schema
with anoperation_id
, and make sure that it is imported somewhere that gets loaded early on, such as aurls.py
:You can then run
manage.py check --deploy
:Some inspection using a
traceback.print_stack()
inGeneratorStats.emit
shows that the error occurs while Django runs other system checks related to theROOT_URLCONF
; the views are imported too early for the check to work. Maybe the views need to be somehow reimported?Expected behavior
The deploy check should show an actual warning:
The text was updated successfully, but these errors were encountered: