Hi. I have an inline formset in my admin site. I also have save_as = True in admin.py. My models are, for example:
class Poll(models.Model):
question = models.CharField(max_length=200, unique = True)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
I chose to have an unique question. The problem is, whenever I try to save a poll as a new poll, if I forget to change the question I get an error, as it supposed to happen. But if I then change the question and try to save I get this error: invalid literal for int() with base 10: '' and if I check the error I see that the pool foreign key is not available and that's the cause of the error. Anyone else has got this error? Is it a django bug? I know that there was an error related with save_as in http://code.djangoproject.com/ticket/9651 but I can't tell if it's related with my error. Try in the django tutorial as I did and see if the error appears. Thanks for any reply.