id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
596	South emits signals which do not honor Django's expectations.	Alexis Petrounias	andrew	"During unit testing for any project with South installed, Model signals (such as post_delete) are being issued by South with ''MigrationHistory'' as the ''sender''. It appears that the ''sender'' does not satisfy all of Django's expectations.

Specifically, it is not possible to load the ''ContentType'' of the ''sender'', as the following code:

{{{
ContentType.objects.get_for_model(sender)
}}}

will result in the following exception:

{{{
    ... ContentType.objects.get_for_model(sender) ...
  File "".../django/contrib/contenttypes/models.py"", line 40, in get_for_model
    self._add_to_cache(self.db, ct)
  File "".../django/contrib/contenttypes/models.py"", line 70, in _add_to_cache
    key = (model._meta.app_label, model._meta.object_name.lower())
AttributeError: 'NoneType' object has no attribute '_meta'
}}}

A workaround is to check at the signal listener whether the ''sender'' of a signal is ''MigrationHistory'' and ignore the signal, however, this is ad-hoc and creates an explicit South dependency."	defect	infoneeded	minor	1.0	migrations	0.7.2		signals	
