  
  from django import forms
  from django.contrib import admin
  from django.contrib.admin.views.main import ChangeList
  from django.core.files.storage import FileSystemStorage
  from django.core.mail import EmailMessage
  from django.core.servers.basehttp import FileWrapper
  from django.conf.urls import patterns, url
  from django.db import models
  from django.forms.models import BaseModelFormSet
 
</s> remove     Telegram, Pizza, Topping, FilteredManager, City, Restaurant, Worker)
 </s> add     Telegram, Pizza, Topping, FilteredManager, City, Restaurant, Worker,
    ParentWithDependentChildren) </s> remove class AdminViewOnSiteTest(TestCase):
 </s> add class AdminViewOnSiteTests(TestCase): </s> remove     EmptyModelVisible, EmptyModelMixin, State, City, Restaurant, Worker)
 </s> add     EmptyModelVisible, EmptyModelMixin, State, City, Restaurant, Worker,
    ParentWithDependentChildren, DependentChild)
from django.core.exceptions import ValidationError
  
  from django import forms
  from django.contrib import admin
  from django.contrib.admin.views.main import ChangeList
from django.core.exceptions import ValidationError
  from django.core.files.storage import FileSystemStorage
  from django.core.mail import EmailMessage
  from django.core.servers.basehttp import FileWrapper
  from django.conf.urls import patterns, url
  from django.db import models
  from django.forms.models import BaseModelFormSet
keep keep keep add keep keep keep keep keep keep
 Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.

Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review. 
tests/admin_views/admin.py