You live, you learn.
Django database API uses objects, instead of IDs. To access the ID of
parent_company, you either  access origcompany.parent_company_id or
origcompany.parent_company.id.

Regards,
Aidas Bendoraitis aka Archatas



On 12/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Ok..after fiddling with this for what seems like forever...I finally
> figured out that all I needed to do was change
>
>  origcompany.parent_company = new_data['parent_company_id']
>
> to
>
>  origcompany.parent_company =
> Company.objects.get(company_id=new_data['parent_company_id'])
>
> I thought I just needed to set the ID..not an object... but figured I'd
> post in case someone else had the same problem.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to