Esempio n. 1
0
    def get_index(self, model_klass):

        indexes = self.get_indexes()

        if model_klass not in indexes:
            raise NotHandled("The model %s is not registered" % model_klass)

        return indexes[model_klass]
    def get_index(self, model_klass):
        if not self._built:
            self.build()

        if model_klass not in self.indexes:
            raise NotHandled('The model %s is not registered' % model_klass.__class__)

        return self.indexes[model_klass]