瀏覽代碼

post_save_set_ancestors_are_public should not run when loading fixtures, (#4040)

The fixtures should contain the correct data.
master
Voxin Muyli 2 年之前
父節點
當前提交
4b9c833a8a
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      src/oscar/apps/catalogue/receivers.py

+ 3
- 0
src/oscar/apps/catalogue/receivers.py 查看文件

@@ -35,4 +35,7 @@ if settings.OSCAR_DELETE_IMAGE_FILES:
35 35
 
36 36
 @receiver(post_save, sender=Category, dispatch_uid='set_ancestors_are_public')
37 37
 def post_save_set_ancestors_are_public(sender, instance, **kwargs):
38
+    if kwargs.get("raw"):
39
+        return
40
+
38 41
     instance.set_ancestors_are_public()

Loading…
取消
儲存