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

feat: allow to upload price of barcode-less products #53

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

raphael0202
Copy link
Contributor

@raphael0202 raphael0202 commented Nov 23, 2023

Add support for barcode-less product by adding a new category_tag field in the prices table.

Also:

  • fix a recursion error in PriceCreate model, due to date namespace clash
  • document all fields of PriceCreate model

Fixes #47.

@raphael0202 raphael0202 requested a review from raphodn November 23, 2023 08:39
@raphael0202 raphael0202 force-pushed the add-barcodeless-product-support branch from e1c8965 to dcd0d1e Compare November 23, 2023 08:40
@raphael0202 raphael0202 force-pushed the add-barcodeless-product-support branch from dcd0d1e to 77ec848 Compare November 23, 2023 08:44
app/schemas.py Show resolved Hide resolved
description="barcode (EAN) of the product, as a string.",
examples=["16584958", "1234567890123"],
)
category_tag: str | None = Field(
Copy link
Member

Choose a reason for hiding this comment

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

in the long terme could this be an enum from the openfoodfacts-python library ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, as the category taxonomy is frequently updated.

app/schemas.py Show resolved Hide resolved
@raphael0202 raphael0202 merged commit d44d86d into main Nov 23, 2023
3 of 4 checks passed
@raphael0202 raphael0202 deleted the add-barcodeless-product-support branch November 23, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add price for a product without EAN code
3 participants