Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Rename product_list_image to more general name

Pacu2edbc1dc3dd42
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.py
index 15730f9f20..a0903dc98a 100644
--- a/saleor/core/utils/random_data.py
+++ b/saleor/core/utils/random_data.py
@@ -274,7 +274,7 @@ def get_or_create_category(category_schema, placeholder_dir):
defaults = {
'description': fake.text(),
'slug': fake.slug(category_name),
- 'background_image': get_product_list_image(image_dir, image_name)}
+ 'background_image': get_image(image_dir, image_name)}
return Category.objects.get_or_create(
name=category_name, defaults=defaults)[0]
@@ -284,7 +284,7 @@ def get_or_create_product_type(name, **kwargs):
def get_or_create_collection(name, placeholder_dir, image_name):
- background_image = get_product_list_image(placeholder_dir, image_name)
+ background_image = get_image(placeholder_dir, image_name)
defaults = {
'slug': fake.slug(name),
'background_image': background_image}
@@ -638,6 +638,6 @@ def get_product_list_images_dir(placeholder_dir):
return product_list_images_dir
-def get_product_list_image(image_dir, image_name):
+def get_image(image_dir, image_name):
img_path = os.path.join(image_dir, image_name)
return File(open(img_path, 'rb'))