pk will work on any model

Change to make the tasks work on models that have a primary key with a name other than 'id'. For example on my model, the field is called 'ID'. This change will make the task work for either.