On 1/11/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>     a = choices.get_list()[0]
>     a.poll_id = 2
>     new_choice = choices.Choice(**a.__dict__())
>     new_choice.save()


Oh, uh, wouldn't you not want to assign poll_id at all on the new obj?
 Assigning =2 could overlay an existing id record, or cause an error
later when serial tries to use it, no?

So:

     a = choices.get_list()[0]
     a.poll_id = None #(or whatever django expects poll_id on new obj
to be; perhaps delete attribute altogether)
     new_choice = choices.Choice(**a.__dict__())
     new_choice.save()

Reply via email to