mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
changed default for auto on hand after shopping
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 3.2.11 on 2022-01-20 14:39
|
||||
|
||||
from django.db import migrations, models
|
||||
from django_scopes import scopes_disabled
|
||||
|
||||
|
||||
def add_default_trigram(apps, schema_editor):
|
||||
with scopes_disabled():
|
||||
UserPreference = apps.get_model('cookbook', 'UserPreference')
|
||||
|
||||
UserPreference.objects.all().update(shopping_add_onhand=False)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('cookbook', '0165_remove_step_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='userpreference',
|
||||
name='shopping_add_onhand',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.RunPython(add_default_trigram),
|
||||
]
|
||||
Reference in New Issue
Block a user