mirror of
https://github.com/ansible/awx.git
synced 2026-07-31 09:59:55 -02:30
Make InstanceLink target non-nullable
InstanceLink target should not be null. Should be safe to set to null=False, because we have a custom RunPython method to explicitly set target to a proper key. Also, add new test to test_migrations which ensures data integrity after migrating the receptor address model changes. Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -69,7 +69,7 @@ class InstanceLink(BaseModel):
|
||||
ordering = ("id",)
|
||||
|
||||
source = models.ForeignKey('Instance', on_delete=models.CASCADE, help_text=_("The source instance of this peer link."))
|
||||
target = models.ForeignKey('ReceptorAddress', null=True, on_delete=models.CASCADE, help_text=_("The target receptor address of this peer link."))
|
||||
target = models.ForeignKey('ReceptorAddress', on_delete=models.CASCADE, help_text=_("The target receptor address of this peer link."))
|
||||
|
||||
class States(models.TextChoices):
|
||||
ADDING = 'adding', _('Adding')
|
||||
|
||||
Reference in New Issue
Block a user