Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix populatedb gift card duplication error
fowczarek8db77f94c396
diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.pyindex 08e13a556b..35cb14c455 100644--- a/saleor/core/utils/random_data.py+++ b/saleor/core/utils/random_data.py@@ -810,7 +810,8 @@ def create_gift_card():[User.objects.filter(is_superuser=False).order_by("?").first()])gift_card, created = GiftCard.objects.get_or_create(- code="Gift_card_10", user=user, initial_balance=10, current_balance=10+ code="Gift_card_10",+ defaults={"user": user, "initial_balance": 10, "current_balance": 10},)if created:yield "Gift card #%d" % gift_card.id