pref: 修改创建 platform

This commit is contained in:
ibuler
2022-08-24 19:32:49 +08:00
parent 063c42b94d
commit bb6b9e6f6e
3 changed files with 4 additions and 6 deletions

View File

@@ -34,8 +34,8 @@ class PlatformGenerator(FakeDataGenerator):
tp = choice(self.category_type[category].choices)
data = {
'name': forgery_py.name.company_name(),
'category': choice(self.categories),
'type': tp
'category': category,
'type': tp[0]
}
platforms.append(Platform(**data))
Platform.objects.bulk_create(platforms, ignore_conflicts=True)