bug fix for lock without locked_by causing error in django 1.5