I have a southern datamigration that is trying to create new objects based on data found in other models. When I try to create a new object for this "destination" model, I keep getting:
Cannot assign "<ContentType: ContentType object>": "Publishing.content_type" must be a "ContentType" instance.
There seems to be something wrong with the "instance" when accessing through the southern ORM freeze, for example:
ContentType = orm['contenttypes.ContentType'] content_type_kwargs = { 'model': ContentModel._meta.module_name, 'app_label': ContentModel._meta.app_label, } content_type = ContentType.objects.get(**content_type_kwargs) # further down publishing_kwargs = { 'site': Site.objects.get_current(), 'publishing_type': publishing_type, 'start': start, 'content_type': content_type, 'object_id': content_object.id, } publishing = orm.Publishing(**publishing_kwargs) # Produces the error above
Now I have checked many times that content_type is actually an instance of ContentType, but somehow django does not count.
- Is there any difference between the frozen, southern version of the instance instance and the native django?
- What else could be possible?
source share