[Answer]-Shopify python API command working in html view but not in views.py file

1👍

variants is presumably a list. In python you use square brackets to index a list:

if product.variants[0].inventory_management:

Leave a comment