I think self.assets can be empty, so this line will raise exception.