Przeglądaj źródła

all line attributes should be converted. (#3985)

master
Viggo de Vries 3 lat temu
rodzic
commit
13b34ea5d2
No account linked to committer's email address

+ 1
- 1
src/oscar/apps/basket/migrations/0010_convert_to_valid_json.py Wyświetl plik

8
 
8
 
9
 def forward(apps, schema_editor):
9
 def forward(apps, schema_editor):
10
     LineAttribute = apps.get_model("basket", "LineAttribute")
10
     LineAttribute = apps.get_model("basket", "LineAttribute")
11
-    for at in LineAttribute.objects.filter(value__isnull=False):
11
+    for at in LineAttribute.objects.all():
12
         try:  # if the value is allready valid json, continue
12
         try:  # if the value is allready valid json, continue
13
             json.loads(at.value)
13
             json.loads(at.value)
14
             continue
14
             continue

+ 1
- 1
src/oscar/apps/order/migrations/0012_convert_to_valid_json.py Wyświetl plik

8
 
8
 
9
 def forward(apps, schema_editor):
9
 def forward(apps, schema_editor):
10
     LineAttribute = apps.get_model("order", "LineAttribute")
10
     LineAttribute = apps.get_model("order", "LineAttribute")
11
-    for at in LineAttribute.objects.filter(value__isnull=False):
11
+    for at in LineAttribute.objects.all():
12
         try:  # if the value is allready valid json, continue
12
         try:  # if the value is allready valid json, continue
13
             json.loads(at.value)
13
             json.loads(at.value)
14
             continue
14
             continue

Ładowanie…
Anuluj
Zapisz