I am trying to create a dynamic universe of options so I created this function that if needed, iterates the stock universe and returns (hopefully) an option contract object. The problem is trying to filter anything out of contracts does not return anything.

def OptionsFilter(self, stock):
        contracts = self.OptionChainProvider.GetOptionContractList(stock, self.Time)

        puts = [x for x in contracts if x.ID.OptionRight == OptionRight.Put]
        puts = sorted(sorted(puts, key = lambda x: x.ID.Date, reverse = True), key = lambda x: x.ID.StrikePrice)
        puts = [x for x in puts if 30 < (self.Time - x.ID.Date).days <= 40 and x.ID.StrikePrice <= stock.Price * 0.8]
        if puts:
            return puts[0]
        return

The argument in this function is a stock symbol object. I checked ID.OptionRight attribute of the first item in contracts and it is 0? I also verified it is an option contract and it is. Its symbol value was SNDL 21015C00006000. According to documentation each object in the contracts list is an option contract that should have the attribute self.Right but it doesnt?