Skip to content

Update product.py#858

Open
yishenggudou wants to merge 1 commit into
awesto:masterfrom
yishenggudou:master
Open

Update product.py#858
yishenggudou wants to merge 1 commit into
awesto:masterfrom
yishenggudou:master

Conversation

@yishenggudou

Copy link
Copy Markdown

quick return if no index in elasticsearch

quick return if no index in elasticsearch
Comment thread shop/models/product.py
of the product.
"""
documents = elasticsearch_registry.get_documents([ProductModel])
if len(documents) == 0:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len(documents) would already evaluate as False, no need to check for comparison to 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants