Extend CustomField migration to update CustomFieldChoice.field.limit_choices_to

This commit is contained in:
Jeremy Stretch 2019-12-05 16:02:52 -05:00
parent 7a3c725f51
commit 4e1ee270cf

View File

@ -1,4 +1,5 @@
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion
CUSTOMFIELD_TYPE_CHOICES = ( CUSTOMFIELD_TYPE_CHOICES = (
@ -48,6 +49,13 @@ class Migration(migrations.Migration):
code=customfield_type_to_slug code=customfield_type_to_slug
), ),
# Update CustomFieldChoice.field.limit_choices_to
migrations.AlterField(
model_name='customfieldchoice',
name='field',
field=models.ForeignKey(limit_choices_to={'type': 'select'}, on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='extras.CustomField'),
),
# CustomField.filter_logic # CustomField.filter_logic
migrations.AlterField( migrations.AlterField(
model_name='customfield', model_name='customfield',