You can ignore these lines. It remove the params that come from AutoField and are None. The fact is that if you are adding a new object to the database and one of your primary keys is AutoField and None than you expect the database to set this value to you. As I've said this code is specific for composite primary key in django ORM.