Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ def get_ingredients():
|
|
| 55 |
|
| 56 |
try:
|
| 57 |
# Construct the base query
|
| 58 |
-
soql = "SELECT Name, Image_URL__c
|
| 59 |
if condition:
|
| 60 |
soql += f" WHERE {condition}"
|
| 61 |
soql += " LIMIT 200"
|
|
@@ -63,7 +63,7 @@ def get_ingredients():
|
|
| 63 |
logger.info(f"Executing SOQL query: {soql}")
|
| 64 |
result = sf.query(soql)
|
| 65 |
ingredients = [
|
| 66 |
-
{"name": record['Name'], "image_url": record.get('Image_URL__c', '')
|
| 67 |
for record in result['records'] if 'Name' in record
|
| 68 |
]
|
| 69 |
logger.info(f"Fetched {len(ingredients)} ingredients: {ingredients}")
|
|
|
|
| 55 |
|
| 56 |
try:
|
| 57 |
# Construct the base query
|
| 58 |
+
soql = "SELECT Name, Image_URL__c FROM Sector_Detail__c"
|
| 59 |
if condition:
|
| 60 |
soql += f" WHERE {condition}"
|
| 61 |
soql += " LIMIT 200"
|
|
|
|
| 63 |
logger.info(f"Executing SOQL query: {soql}")
|
| 64 |
result = sf.query(soql)
|
| 65 |
ingredients = [
|
| 66 |
+
{"name": record['Name'], "image_url": record.get('Image_URL__c', '')}
|
| 67 |
for record in result['records'] if 'Name' in record
|
| 68 |
]
|
| 69 |
logger.info(f"Fetched {len(ingredients)} ingredients: {ingredients}")
|