From ca15dc31cce53b0119dcf1e1c9fae03423bbe5de Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 11 Jan 2019 16:54:52 +0100 Subject: Fix treatment state migration --- archaeological_finds/migrations/0050_auto_20181211_1509.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archaeological_finds/migrations') diff --git a/archaeological_finds/migrations/0050_auto_20181211_1509.py b/archaeological_finds/migrations/0050_auto_20181211_1509.py index 40461569c..b85383c94 100644 --- a/archaeological_finds/migrations/0050_auto_20181211_1509.py +++ b/archaeological_finds/migrations/0050_auto_20181211_1509.py @@ -28,7 +28,7 @@ def migrate_treatment_states(apps, schema): t.order = order t.save() if TreatmentState.objects.filter(txt_idx=finished).count(): - f = TreatmentState.objects.filter(txt_idx=finished) + f = TreatmentState.objects.get(txt_idx=finished) for t in Treatment.objects.filter(treatment_state__isnull=True): t.treatment_state = f t.save() -- cgit v1.2.3