Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Allow to reverse migration

Roland Geider34f9e11e1d15
diff --git a/wger/nutrition/migrations/0013_ingredient_image.py b/wger/nutrition/migrations/0013_ingredient_image.py
index e121312ff..bafb33854 100644
--- a/wger/nutrition/migrations/0013_ingredient_image.py
+++ b/wger/nutrition/migrations/0013_ingredient_image.py
@@ -7,6 +7,10 @@ import wger.nutrition.models.image
import wger.utils.helpers
+def noop(apps, schema_editor):
+ pass
+
+
def generate_uuids(apps, schema_editor):
"""
Generate new UUIDs for each exercise
@@ -102,7 +106,7 @@ class Migration(migrations.Migration):
},
bases=(models.Model, wger.utils.helpers.BaseImage),
),
- migrations.RunPython(generate_uuids),
+ migrations.RunPython(generate_uuids, reverse_code=noop),
migrations.AlterField(
model_name='ingredient',
name='uuid',