mirror of
https://github.com/Findus23/RPGnotes.git
synced 2024-09-19 15:43:45 +02:00
fix migration
This commit is contained in:
parent
cdf4c8ac60
commit
557c56374a
1 changed files with 6 additions and 2 deletions
|
@ -1,10 +1,14 @@
|
||||||
# Generated by Django 4.1.3 on 2022-11-19 17:03
|
# Generated by Django 4.1.3 on 2022-11-19 17:03
|
||||||
|
from random import randint
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
def random_string():
|
||||||
|
return str(randint(10000, 99999))
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("loot", "0014_loottype_historicalloot_type_loot_type"),
|
("loot", "0014_loottype_historicalloot_type_loot_type"),
|
||||||
]
|
]
|
||||||
|
@ -13,7 +17,7 @@ class Migration(migrations.Migration):
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name="loottype",
|
model_name="loottype",
|
||||||
name="slug",
|
name="slug",
|
||||||
field=models.SlugField(default="defaultslug", editable=False, unique=True),
|
field=models.SlugField(default=random_string, editable=False, unique=True),
|
||||||
preserve_default=False,
|
preserve_default=False,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue