#12316: GenericForeignKey produces an error when submitting from a form
---------------------------+------------------------------------------------
 Reporter:  djansoft       |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.1-beta-1
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 I apologize for not making a better report, but I cannot afford the time
 right now to write the minimum amount of code to reproduce this.

 Snippet from my models.py:

 {{{
 class Subscription(models.Model):
     user = models.OneToOneField(User, primary_key=True)
     promotion = models.ForeignKey(Promotion)
     start_date = models.DateTimeField(auto_now_add=True)
     # Foreign key to AuthorizeNetSubscription u other model
     payment_gateway_subscription = generic.GenericForeignKey()
     is_active = models.BooleanField(default=True)


 class AuthorizeNetSubscription(models.Model):
     subscription_id = models.CharField('subscriptionId in the ARB API call
 return',
             max_length=16, primary_key=True)
 }}}

 Snippet from my forms.py:

 {{{
         authorize_net_subscription = AuthorizeNetSubscription(
                 subscription_id=result_dict.subscription_id.text_)
         user = User.objects.create_user(
             username = form_list[1].cleaned_data['display_name'],
             email=email,
             password=password,
         )
         subscription = Subscription(
             user=user,
             promotion=promotion,
             start_date=start_date,
             payment_gateway_subscription=authorize_net_subscription
         )
 }}}

 It fails in the line that creates the Subscription instance with a
 TypeError exception "'object_id' is an invalid keyword argument for this
 function" coming from line 320 in django/db/models/base.py

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12316>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--

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


Reply via email to