Refs #27914 -- Used __qualname__ in model operations' deconstruct().

This commit is contained in:
chillaranand 2017-06-14 18:11:24 +05:30 committed by Tim Graham
parent fb0f987f7d
commit 451b585c2f
2 changed files with 14 additions and 14 deletions

View File

@ -71,7 +71,7 @@ class CreateModel(ModelOperation):
if self.managers and self.managers != [('objects', models.Manager())]: if self.managers and self.managers != [('objects', models.Manager())]:
kwargs['managers'] = self.managers kwargs['managers'] = self.managers
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -232,7 +232,7 @@ class DeleteModel(ModelOperation):
'name': self.name, 'name': self.name,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -276,7 +276,7 @@ class RenameModel(ModelOperation):
'new_name': self.new_name, 'new_name': self.new_name,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -429,7 +429,7 @@ class AlterModelTable(ModelOperation):
'table': self.table, 'table': self.table,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -505,7 +505,7 @@ class AlterUniqueTogether(FieldRelatedOptionOperation):
'unique_together': self.unique_together, 'unique_together': self.unique_together,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -559,7 +559,7 @@ class AlterIndexTogether(FieldRelatedOptionOperation):
'index_together': self.index_together, 'index_together': self.index_together,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -608,7 +608,7 @@ class AlterOrderWithRespectTo(FieldRelatedOptionOperation):
'order_with_respect_to': self.order_with_respect_to, 'order_with_respect_to': self.order_with_respect_to,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -683,7 +683,7 @@ class AlterModelOptions(ModelOptionOperation):
'options': self.options, 'options': self.options,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -718,7 +718,7 @@ class AlterModelManagers(ModelOptionOperation):
def deconstruct(self): def deconstruct(self):
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[self.name, self.managers], [self.name, self.managers],
{} {}
) )
@ -781,7 +781,7 @@ class AddIndex(IndexOperation):
'index': self.index, 'index': self.index,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs, kwargs,
) )
@ -827,7 +827,7 @@ class RemoveIndex(IndexOperation):
'name': self.name, 'name': self.name,
} }
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs, kwargs,
) )

View File

@ -24,7 +24,7 @@ class SeparateDatabaseAndState(Operation):
if self.state_operations: if self.state_operations:
kwargs['state_operations'] = self.state_operations kwargs['state_operations'] = self.state_operations
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -87,7 +87,7 @@ class RunSQL(Operation):
if self.hints: if self.hints:
kwargs['hints'] = self.hints kwargs['hints'] = self.hints
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )
@ -164,7 +164,7 @@ class RunPython(Operation):
if self.hints: if self.hints:
kwargs['hints'] = self.hints kwargs['hints'] = self.hints
return ( return (
self.__class__.__name__, self.__class__.__qualname__,
[], [],
kwargs kwargs
) )