Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create_article(self, shop_id, **kwargs):
article = create_article(shop_id, **kwargs)
self.db.session.add(article)
self.db.session.commit()
return article
def create_article(available_from, available_until):
return _create_article(
'shop-123',
available_from=available_from,
available_until=available_until,
)
def add_item(cart, quantity):
article = create_article('shop-123')
cart.add_item(article, quantity)
def create_item(quantity):
article = create_article('shop-123')
return CartItem(article, quantity)
def create_article(shop_id, **kwargs):
article = _create_article(shop_id, **kwargs)
return article_service.create_article(
shop_id,
article.item_number,
article.description,
article.price,
article.tax_rate,
article.quantity,
)