I try to consolidate data using 1min bars and into daily bars, all within the FX market. Then I want to implement a rule, that transactions would only be executed 1 minute after midnight. Although I think I edited the code correctly, I receive this error:

'dict' object has no attribute 'Add'
  at CustomBarHandler

Do you know what might be the reason of it?

The code looks as follows:

# region imports
from AlgorithmImports import *
# endregion

class CustomIndexStrategy(QCAlgorithm):

    def Initialize(self):

        self.EURSEK = self.AddForex(self.Pair_1, Resolution.Minute, Market.Oanda).Symbol
        self.Consolidate(self.EURSEK, Resolution.Daily, self.CustomBarHandler)

        self.prevPrices = { symbol : RollingWindow[QuoteBar](7) for symbol in self.symbols }

	def OnData(self,data):
        if not (self.Time.hour == 0  and self.Time.minute == 1):
    def CustomBarHandler(self, bar ):