You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.
There are a few instances in the code of using *.objects.all()[0] instead of *.objects.first(). This is an antipattern, but because there are examples of it, people take it to heart.
Using grep, you should be able to identify all instances of this (e.g. grep 'all()\[0\]' $( find . -name '*.py' )).
Using find and replace with sed (linux, macos), you can fix it in bulk.
The text was updated successfully, but these errors were encountered:
There are a few instances in the code of using
*.objects.all()[0]
instead of*.objects.first()
. This is an antipattern, but because there are examples of it, people take it to heart.Using
grep
, you should be able to identify all instances of this (e.g.grep 'all()\[0\]' $( find . -name '*.py' )
).Using find and replace with
sed
(linux, macos), you can fix it in bulk.The text was updated successfully, but these errors were encountered: