mirror of
https://github.com/ansible/awx.git
synced 2026-08-01 02:19: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:
@@ -134,4 +134,11 @@ class Migration(migrations.Migration):
|
||||
name='peers',
|
||||
field=models.ManyToManyField(related_name='peers_from', through='main.InstanceLink', to='main.receptoraddress'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='instancelink',
|
||||
name='target',
|
||||
field=models.ForeignKey(
|
||||
help_text='The target receptor address of this peer link.', on_delete=django.db.models.deletion.CASCADE, to='main.receptoraddress'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user