瀏覽代碼

Merge pull request #4118 from jribbens/master

Fix convert_to_valid_json migrations
master
Voxin Muyli 2 年之前
父節點
當前提交
d5d4e005c2
No account linked to committer's email address

+ 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

Loading…
取消
儲存