소스 검색

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
No account linked to committer's email address
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…
취소
저장