title: Django admin - Duplicate an item under a NestedModelAdmin
body: <p>This question is directly related to <a href="https://stackoverflow.com/questions/180809/in-the-django-admin-interface-is-there-a-way-to-duplicate-an-item">this question</a>. Can I add the "save_as = True" field on an object with a <code>NestedModelAdmin</code>? If so, is there anything I need to do to get it to properly duplicate/save as new? </p>
  
  <p>I added the field to my admin model which changes my button, but when I click the "save as new" button, it changes the text in that same button to "save and add another". Anything I click after that ("save", "save and continue editing", or "save and add another") returns this error:</p>
  
  <pre><code>Exception Type: ValidationError
  Exception Value:    
  [u"'' value must be an integer."]
  </code></pre>
  
  <p>I was able to add the "save_as" field to a different object that had the <code>admin.ModelAdmin</code> and it duplicated an object successfully. I tried implementing the code seen in <a href="https://stackoverflow.com/questions/18577324/django-save-as-new-and-keep-image-fields">this question/answer</a>, but I get the same error. I looked through the documentation (at least the little bit I can understand) and I can't find anything that helps. Is this field something that can't added to a NestedModelAdmin? Any pointers of the right direction would be a huge help.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Not sure if this helps, but this a portion of the code from my admin.py file from the elements involved.</p>
  
  <pre><code>class NestedChoiceInline(NestedStackedInline):
      model = Choice
      form = ChoiceInlineForm
      extra = 1
      fk_name = 'question'
  
  
  class QuestionInline(NestedStackedInline):
      model = Question
      form = QuestionInlineForm
      extra = 1
      fk_name = 'quiz'
      inlines = [NestedChoiceInline]
      exclude = ['order', ]
  
  
  class QuizAdmin(NestedModelAdmin):
      model = Quiz
      form = QuizForm
      inlines = [QuestionInline]
      list_display = ('name', 'quiz_start_date',
                      'quiz_end_date')
      save_as = True
  
      # From another answer that I think I need to do to replicate my object 
      # and anything that has a key to it, but I'm not sure
      def save_model(self, request, obj, form, change):
          if '_saveasnew' in request.POST:
              original_pk = resolve(request.path).args[0]
              original_obj = obj._meta.concrete_model.objects.get(id=original_pk)
  
              for prop, value in vars(original_obj).iteritems():
                  if isinstance(getattr(original_obj, prop), FieldFile):
                      setattr(obj,prop,getattr(original_obj, prop))
          obj.save()
  </code></pre>
  
  <p>I am pretty sure that I understand what that <code>save_model</code> method is doing, but I am not sure which of the parts I may need to customize in order to get everything appropriately assigned/duplicated.</p>