Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added get_sku_manufacturer #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lfs/catalog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,16 @@ def get_manufacturer(self):
else:
return self.manufacturer

def get_sku_manufacturer(self):
"""
Returns the manufacturer sku. Takes care whether the product is a
variant.
"""
if self.is_variant()
return self.parent.sku_manufacturer
else:
return self.sku_manufacturer

def has_related_products(self):
"""
Returns True if the product has related products.
Expand Down