          for opts in needed_opts:
              # These weren't in the cache, or the DB, create them.
              ct = self.create(
                  app_label=opts.app_label,
                  model=opts.object_name.lower(),
                  name=smart_text(opts.verbose_name_raw),
              )
              self._add_to_cache(self.db, ct)
              results[ct.model_class()] = ct
          return results
 
</s> remove                 model = opts.object_name.lower(),
 </s> add                 model = opts.model_name, </s> remove                 needed_models.add(opts.object_name.lower())
 </s> add                 needed_models.add(opts.model_name) </s> remove         key = (model._meta.app_label, model._meta.object_name.lower())
 </s> add         key = (model._meta.app_label, model._meta.model_name) </s> remove         (model._meta.object_name.lower(), model)
 </s> add         (model._meta.model_name, model) </s> remove                 {'%s__isnull' % self.parent_model._meta.module_name: False})
 </s> add                 {'%s__isnull' % self.parent_model._meta.model_name: False})
                model=opts.model_name,
          for opts in needed_opts:
              # These weren't in the cache, or the DB, create them.
              ct = self.create(
                  app_label=opts.app_label,
                model=opts.model_name,
                  name=smart_text(opts.verbose_name_raw),
              )
              self._add_to_cache(self.db, ct)
              results[ct.model_class()] = ct
          return results
keep keep keep keep replace keep keep keep keep keep
 Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`. 
django/contrib/contenttypes/models.py