Fixed a django upgrade issue