We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
admin.register()
unregister
Currently the new admin.register fixer from #182 moves register() calls after unregister() calls:
admin.register
register()
unregister()
+@admin.register(User) class CustomUserAdmin(...): ... admin.site.unregister(User) -admin.site.register(User, CustomUserAdmin)
This is unsafe!
Update the fixer to detect unregister calls and avoid rewriting.
@andreasschmitz
The text was updated successfully, but these errors were encountered:
Fixes adamchainz#239
27d6c44
Updates the "register admin" fixer to ignore register calls if preceded by an unregister.
42ddb82
b83ca14
Successfully merging a pull request may close this issue.
Description
Currently the new
admin.register
fixer from #182 movesregister()
calls afterunregister()
calls:This is unsafe!
Update the fixer to detect
unregister
calls and avoid rewriting.@andreasschmitz
The text was updated successfully, but these errors were encountered: