ソースを参照

Merge pull request #4118 from jribbens/master

Fix convert_to_valid_json migrations
master
Voxin Muyli 2年前
コミット
d5d4e005c2
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 1
- 1
src/oscar/apps/basket/migrations/0010_convert_to_valid_json.py ファイルの表示

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

+ 1
- 1
src/oscar/apps/order/migrations/0012_convert_to_valid_json.py ファイルの表示

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

読み込み中…
キャンセル
保存