Something is ticking.

Missing objects in Django admin list view (change list)

This was a good one…

The object count at the bottom of the list view was changing accordingly but no objects were being display in the list. I had recently made some changes to the model so that kept me busy for a while. But ultimately it turned out to be a broken foreign key on a distantly related object. Also, I was using fixtures so this allowed a broken FK to get into the DB. Normally Django will detect this situation but apparently fixtures can lead to this situation.

Moral of the story – If you’re experiencing this problem – you have a broken FK somewhere in your project.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.