Fixed search problem ('dict' object has no attribute 'CategoryId')