Browse Source

sandbox: allow running make build_sandbox multiple times

master
Michael van Tellingen 9 years ago
parent
commit
bf1c6f18b2
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      Makefile
  2. 1
    1
      src/oscar/apps/partner/importers.py

+ 1
- 1
Makefile View File

17
 	sites/sandbox/manage.py loaddata sites/sandbox/fixtures/child_products.json
17
 	sites/sandbox/manage.py loaddata sites/sandbox/fixtures/child_products.json
18
 	sites/sandbox/manage.py oscar_import_catalogue sites/sandbox/fixtures/*.csv
18
 	sites/sandbox/manage.py oscar_import_catalogue sites/sandbox/fixtures/*.csv
19
 	sites/sandbox/manage.py oscar_import_catalogue_images sites/sandbox/fixtures/images.tar.gz
19
 	sites/sandbox/manage.py oscar_import_catalogue_images sites/sandbox/fixtures/images.tar.gz
20
-	sites/sandbox/manage.py oscar_populate_countries
20
+	sites/sandbox/manage.py oscar_populate_countries --initial-only
21
 	sites/sandbox/manage.py loaddata sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json sites/_fixtures/offers.json
21
 	sites/sandbox/manage.py loaddata sites/_fixtures/pages.json sites/_fixtures/auth.json sites/_fixtures/ranges.json sites/_fixtures/offers.json
22
 	sites/sandbox/manage.py loaddata sites/sandbox/fixtures/orders.json
22
 	sites/sandbox/manage.py loaddata sites/sandbox/fixtures/orders.json
23
 	sites/sandbox/manage.py clear_index --noinput
23
 	sites/sandbox/manage.py clear_index --noinput

+ 1
- 1
src/oscar/apps/partner/importers.py View File

95
 
95
 
96
         # Category
96
         # Category
97
         cat = create_from_breadcrumbs(category_str)
97
         cat = create_from_breadcrumbs(category_str)
98
-        ProductCategory.objects.create(product=item, category=cat)
98
+        ProductCategory.objects.update_or_create(product=item, category=cat)
99
 
99
 
100
         return item
100
         return item
101
 
101
 

Loading…
Cancel
Save