mirror of
				https://github.com/django/django.git
				synced 2025-10-26 07:06:08 +00:00 
			
		
		
		
	Refs #26144 -- Used proxy_for_model instead of mro inspection.
This commit is contained in:
		| @@ -1,4 +1,3 @@ | ||||
| import inspect | ||||
| import warnings | ||||
| from collections import OrderedDict | ||||
|  | ||||
| @@ -142,7 +141,7 @@ class Command(BaseCommand): | ||||
|             for model in models: | ||||
|                 if model in excluded_models: | ||||
|                     continue | ||||
|                 if model._meta.proxy and inspect.getmro(model)[1] not in models: | ||||
|                 if model._meta.proxy and model._meta.proxy_for_model not in models: | ||||
|                     warnings.warn( | ||||
|                         "%s is a proxy model and won't be serialized." % model._meta.label, | ||||
|                         category=ProxyModelWarning, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user