Spaces:
Sleeping
Sleeping
Commit ·
d30cd23
1
Parent(s): f5367b2
fix(favorite_model): correct string interpolation syntax in logger statements
Browse files
app/models/favorite_model.py
CHANGED
|
@@ -17,7 +17,7 @@ class BookMyServiceFavoriteModel:
|
|
| 17 |
favorite_data:dict
|
| 18 |
):
|
| 19 |
"""Create a new favorite merchant entry"""
|
| 20 |
-
logger.info(f"Creating favorite for customer {customer_id}, merchant {favorite_data[
|
| 21 |
|
| 22 |
try:
|
| 23 |
# Check if favorite already exists
|
|
@@ -48,7 +48,7 @@ class BookMyServiceFavoriteModel:
|
|
| 48 |
{"$set": {"favorites": sanitized_favorite}}
|
| 49 |
)
|
| 50 |
if update_res.modified_count > 0:
|
| 51 |
-
logger.info(f"favourites created successfully: {favorite_data[
|
| 52 |
else:
|
| 53 |
logger.info(f"favourites creation attempted with no modified_count for user: {customer_id}")
|
| 54 |
|
|
|
|
| 17 |
favorite_data:dict
|
| 18 |
):
|
| 19 |
"""Create a new favorite merchant entry"""
|
| 20 |
+
logger.info(f"Creating favorite for customer {customer_id}, merchant {favorite_data['merchant_id']}")
|
| 21 |
|
| 22 |
try:
|
| 23 |
# Check if favorite already exists
|
|
|
|
| 48 |
{"$set": {"favorites": sanitized_favorite}}
|
| 49 |
)
|
| 50 |
if update_res.modified_count > 0:
|
| 51 |
+
logger.info(f"favourites created successfully: {favorite_data['merchant_id']} for user: {customer_id}")
|
| 52 |
else:
|
| 53 |
logger.info(f"favourites creation attempted with no modified_count for user: {customer_id}")
|
| 54 |
|