Parcourir la source

Merge pull request #4118 from jribbens/master

Fix convert_to_valid_json migrations
master
Voxin Muyli il y a 2 ans
Parent
révision
d5d4e005c2
Aucun compte lié à l'adresse e-mail de l'auteur

+ 1
- 1
src/oscar/apps/basket/migrations/0010_convert_to_valid_json.py Voir le fichier

@@ -20,7 +20,7 @@ def forward(apps, schema_editor):
20 20
             at.value = json.dumps(val, cls=DjangoJSONEncoder)
21 21
             at.save()
22 22
             continue
23
-        except ValueError:
23
+        except (ValueError, SyntaxError):
24 24
             pass
25 25
 
26 26
         # convert the string to json as it is

+ 1
- 1
src/oscar/apps/order/migrations/0012_convert_to_valid_json.py Voir le fichier

@@ -20,7 +20,7 @@ def forward(apps, schema_editor):
20 20
             at.value = json.dumps(val, cls=DjangoJSONEncoder)
21 21
             at.save()
22 22
             continue
23
-        except ValueError:
23
+        except (ValueError, SyntaxError):
24 24
             pass
25 25
 
26 26
         # convert the string to json as it is

Chargement…
Annuler
Enregistrer