feat(api): Update quantity unit IDs in app.py and docker-compose.yml
This commit is contained in:
parent
2c13989889
commit
d4c58bf9f0
7
app.py
7
app.py
@ -27,7 +27,8 @@ import base64
|
|||||||
GROCY_URL = os.environ.get("GROCY_URL")
|
GROCY_URL = os.environ.get("GROCY_URL")
|
||||||
GROCY_API_KEY = os.environ.get("GROCY_API_KEY")
|
GROCY_API_KEY = os.environ.get("GROCY_API_KEY")
|
||||||
GROCY_PORT = os.environ.get("GROCY_PORT")
|
GROCY_PORT = os.environ.get("GROCY_PORT")
|
||||||
GROCY_DEFAULT_QUANTITY_UNIT_ID = os.environ.get("GROCY_DEFAULT_QUANTITY_UNIT_ID")
|
GROCY_DEFAULT_QUANTITY_UNIT_ID_PURCHASE = os.environ.get("GROCY_DEFAULT_QUANTITY_UNIT_ID_PURCHASE")
|
||||||
|
GROCY_DEFAULT_QUANTITY_UNIT_ID_STOCK = os.environ.get("GROCY_DEFAULT_QUANTITY_UNIT_ID_STOCK")
|
||||||
GROCY_DEFAULT_BEST_BEFORE_DAYS = os.environ.get("GROCY_DEFAULT_BEST_BEFORE_DAYS")
|
GROCY_DEFAULT_BEST_BEFORE_DAYS = os.environ.get("GROCY_DEFAULT_BEST_BEFORE_DAYS")
|
||||||
X_RapidAPI_Key = os.environ.get("X_RapidAPI_Key")
|
X_RapidAPI_Key = os.environ.get("X_RapidAPI_Key")
|
||||||
|
|
||||||
@ -60,8 +61,8 @@ def add_product(dict_good, location):
|
|||||||
"name": good_name,
|
"name": good_name,
|
||||||
"description": "",
|
"description": "",
|
||||||
"location_id": location_map[location],
|
"location_id": location_map[location],
|
||||||
"qu_id_purchase": GROCY_DEFAULT_QUANTITY_UNIT_ID,
|
"qu_id_purchase": GROCY_DEFAULT_QUANTITY_UNIT_ID_PURCHASE,
|
||||||
"qu_id_stock": GROCY_DEFAULT_QUANTITY_UNIT_ID,
|
"qu_id_stock": GROCY_DEFAULT_QUANTITY_UNIT_ID_STOCK,
|
||||||
"default_best_before_days": GROCY_DEFAULT_BEST_BEFORE_DAYS,
|
"default_best_before_days": GROCY_DEFAULT_BEST_BEFORE_DAYS,
|
||||||
"default_consume_location_id": location_map[location],
|
"default_consume_location_id": location_map[location],
|
||||||
"move_on_open": "1",
|
"move_on_open": "1",
|
||||||
|
|||||||
@ -8,7 +8,8 @@ services:
|
|||||||
- GROCY_API_KEY=your-api-key
|
- GROCY_API_KEY=your-api-key
|
||||||
- GROCY_URL=https://grocy.tunpok.com
|
- GROCY_URL=https://grocy.tunpok.com
|
||||||
- GROCY_PORT=443
|
- GROCY_PORT=443
|
||||||
- GROCY_DEFAULT_QUANTITY_UNIT_ID=1
|
- GROCY_DEFAULT_QUANTITY_UNIT_ID_PURCHASE=2
|
||||||
|
- GROCY_DEFAULT_QUANTITY_UNIT_ID_STOCK=6
|
||||||
- GROCY_DEFAULT_BEST_BEFORE_DAYS=365
|
- GROCY_DEFAULT_BEST_BEFORE_DAYS=365
|
||||||
ports:
|
ports:
|
||||||
- 9288:9288
|
- 9288:9288
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user