From c018055d5f5a9987696b17dad49cca860f717cb7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 25 Oct 2022 19:58:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?pref:=20=E4=BF=AE=E6=94=B9migrations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/migrations/0013_auto_20221025_1908.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/migrations/0013_auto_20221025_1908.py b/apps/authentication/migrations/0013_auto_20221025_1908.py index 17556e60c..452063f35 100644 --- a/apps/authentication/migrations/0013_auto_20221025_1908.py +++ b/apps/authentication/migrations/0013_auto_20221025_1908.py @@ -7,7 +7,7 @@ import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ - ('assets', '0111_alter_changesecretautomation_secret_strategy'), + ('assets', '0110_auto_20221021_1506'), ('authentication', '0012_auto_20220816_1629'), ] From e327c971700387ca65483c30517881d784d2168f Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 25 Oct 2022 20:09:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?pref:=20=E4=BF=AE=E6=94=B9=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/migrations/0103_auto_20220811_1511.py | 2 +- apps/assets/models/asset/common.py | 3 +-- apps/terminal/migrations/0054_auto_20221024_1452.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/assets/migrations/0103_auto_20220811_1511.py b/apps/assets/migrations/0103_auto_20220811_1511.py index 15cfff68b..b10455d2f 100644 --- a/apps/assets/migrations/0103_auto_20220811_1511.py +++ b/apps/assets/migrations/0103_auto_20220811_1511.py @@ -14,7 +14,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='asset', name='platform', - field=models.ForeignKey(default=assets.models.platform.Platform.default, on_delete=django.db.models.deletion.PROTECT, related_name='assets', to='assets.platform', verbose_name='Platform'), + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='assets', to='assets.platform', verbose_name='Platform'), ), migrations.RemoveField( model_name='asset', diff --git a/apps/assets/models/asset/common.py b/apps/assets/models/asset/common.py index 5355d0035..fd29bf6a4 100644 --- a/apps/assets/models/asset/common.py +++ b/apps/assets/models/asset/common.py @@ -90,8 +90,7 @@ class Asset(NodesRelationMixin, AbsConnectivity, JMSOrgBaseModel): id = models.UUIDField(default=uuid.uuid4, primary_key=True) name = models.CharField(max_length=128, verbose_name=_('Name')) address = models.CharField(max_length=128, verbose_name=_('IP'), db_index=True) - platform = models.ForeignKey(Platform, default=Platform.default, on_delete=models.PROTECT, - verbose_name=_("Platform"), related_name='assets') + platform = models.ForeignKey(Platform, on_delete=models.PROTECT, verbose_name=_("Platform"), related_name='assets') domain = models.ForeignKey("assets.Domain", null=True, blank=True, related_name='assets', verbose_name=_("Domain"), on_delete=models.SET_NULL) nodes = models.ManyToManyField('assets.Node', default=default_node, related_name='assets', diff --git a/apps/terminal/migrations/0054_auto_20221024_1452.py b/apps/terminal/migrations/0054_auto_20221024_1452.py index 687730158..c2d67ca65 100644 --- a/apps/terminal/migrations/0054_auto_20221024_1452.py +++ b/apps/terminal/migrations/0054_auto_20221024_1452.py @@ -22,7 +22,7 @@ class Migration(migrations.Migration): ('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')), ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), ('name', models.CharField(max_length=128, unique=True, verbose_name='Name')), - ('display_name', models.CharField(max_length=128, unique=True, verbose_name='Display name')), + ('display_name', models.CharField(max_length=128, verbose_name='Display name')), ('version', models.CharField(max_length=16, verbose_name='Version')), ('author', models.CharField(max_length=128, verbose_name='Author')), ('type', models.CharField(choices=[('general', 'General'), ('web', 'Web')], default='general', max_length=16, verbose_name='Type')),