Fix Bug: 'tuple' object has no attribute 'pk'