From b64a70b49016940c28c7d6c8a7a7129180b7a43e Mon Sep 17 00:00:00 2001 From: guohelu <141622458+guohelu@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:54:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=20#7626=20(#7632)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复字段类型 #7626 * fix: 修改提示信息 #7626 --- gcloud/contrib/template_market/migrations/0001_initial.py | 4 ++-- gcloud/contrib/template_market/models.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcloud/contrib/template_market/migrations/0001_initial.py b/gcloud/contrib/template_market/migrations/0001_initial.py index 1a2ab4fc8..55f205cd3 100644 --- a/gcloud/contrib/template_market/migrations/0001_initial.py +++ b/gcloud/contrib/template_market/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-12-12 12:23 +# Generated by Django 3.2.15 on 2024-12-13 07:48 from django.db import migrations, models @@ -15,7 +15,7 @@ class Migration(migrations.Migration): fields=[ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("project_id", models.IntegerField(default=-1, help_text="项目 ID", verbose_name="项目 ID")), - ("template_id", models.JSONField(db_index=True, help_text="模板 ID 列表", verbose_name="模板 ID 列表")), + ("template_id", models.IntegerField(db_index=True, help_text="模板 ID", verbose_name="模板 ID ")), ("creator", models.CharField(default="", max_length=32, verbose_name="创建者")), ("create_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")), ("update_at", models.DateTimeField(auto_now=True, verbose_name="更新时间")), diff --git a/gcloud/contrib/template_market/models.py b/gcloud/contrib/template_market/models.py index 04d02eae0..1b761dbe7 100644 --- a/gcloud/contrib/template_market/models.py +++ b/gcloud/contrib/template_market/models.py @@ -65,7 +65,7 @@ def update_shared_record(self, new_template_ids, market_record_id, project_id, c class TemplateSharedRecord(models.Model): project_id = models.IntegerField(_("项目 ID"), default=-1, help_text="项目 ID") - template_id = models.JSONField(_("模板 ID 列表"), help_text="模板 ID 列表", db_index=True) + template_id = models.IntegerField(_("模板 ID"), help_text="模板 ID", db_index=True) creator = models.CharField(_("创建者"), max_length=32, default="") create_at = models.DateTimeField(_("创建时间"), auto_now_add=True) update_at = models.DateTimeField(verbose_name=_("更新时间"), auto_now=True)