Yes, Jukka is entirely right. You have to use the frozem version of
Company - i.e. orm['entity.Company'] - as it's a different model to the
Jukka V limaa wrote:
> My hunch is that you should also freeze the matchmaking app to the
> migration with "--freeze", and use the frozen orm in getting company
> profile. The frozen orm models are not the same classes that you get
> by importing.
> On Wed, Dec 2, 2009 at 3:15 AM, Justin <stryder...@gmail.com
> <mailto:stryder...@gmail.com>> wrote:
> Hello!
> I'm loving South right now, it's made my life so much easier.
> I"m running into this problem. Here's the models.
> In app entity:
> class Company(models.Model):
> name = models.CharField()
> ...
> In app matchmaking:
> class CompanyProfile(models.Model):
> company = models.OneToOneField(Company)
> ...
> I'm working with the matchmaking app and I've frozen the entity app.
> Here's my migration:
> def forwards(self, orm):
> "Write your forwards migration here"
> for company in orm['entity.Company'].objects.all():
> CompanyProfile.objects.get_or_create(company=company)
> I'm getting an error that I need to pass in a Company object.
> ValueError: Cannot assign "<company: company object>":
> "CompanyProfile.company" must be a "Company" instance.
> Am I doing this wrong? Any ideas?
> Thanks!
> Justin
> --
> You received this message because you are subscribed to the Google
> Groups "South Users" group.
> To post to this group, send email to south-users@googlegroups.com
> <mailto:south-users@googlegroups.com>.
> To unsubscribe from this group, send email to
> south-users+unsubscribe@googlegroups.com
> <mailto:south-users%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/south-users?hl=en.
> --
> You received this message because you are subscribed to the Google
> Groups "South Users" group.
> To post to this group, send email to south-users@googlegroups.com.
> To unsubscribe from this group, send email to
> south-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/south-users?hl=en.