-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
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
Issue with basic django admin and "LogEntry" #27
Comments
Django debug toolbar reports that only 1 sql query is issue on /admin/ page, the one below.
|
There are two typoes of anomalies that nplusone reports about:
The query above contains two joins. If at least one of these is the result of use of My impression right now: Not a bug in nplusone but suboptimally performing code in Django admin. What do you think? |
This workaround did the trick for me:
|
Allright I'll check the next time that it appears somewhere - i'm not on this project anymore ; maybe it issued a select_related() on User and never used it, indeeed. |
Accessing the Django2.2.1 admin on a rather simple project, with nplusone 1.0.0, raises this error :
"Potential unnecessary eager load detected on
LogEntry.user
"I don't get what this means, since LogEntry.user is a ForeignKey, how could it lead to a heavy loading ? What kind of problem does nplusone report in this case, is it with the User model or with the LogEntry model ?
The text was updated successfully, but these errors were encountered: