diff --git a/__pycache__/config.cpython-310.pyc b/__pycache__/config.cpython-310.pyc new file mode 100644 index 0000000..47b81c3 Binary files /dev/null and b/__pycache__/config.cpython-310.pyc differ diff --git a/__pycache__/database.cpython-310.pyc b/__pycache__/database.cpython-310.pyc new file mode 100644 index 0000000..3f91bad Binary files /dev/null and b/__pycache__/database.cpython-310.pyc differ diff --git a/__pycache__/main.cpython-310.pyc b/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000..321183c Binary files /dev/null and b/__pycache__/main.cpython-310.pyc differ diff --git a/__pycache__/outh.cpython-310.pyc b/__pycache__/outh.cpython-310.pyc new file mode 100644 index 0000000..23ddb26 Binary files /dev/null and b/__pycache__/outh.cpython-310.pyc differ diff --git a/__pycache__/postsqldb.cpython-310.pyc b/__pycache__/postsqldb.cpython-310.pyc new file mode 100644 index 0000000..42d2f70 Binary files /dev/null and b/__pycache__/postsqldb.cpython-310.pyc differ diff --git a/__pycache__/webpush.cpython-310.pyc b/__pycache__/webpush.cpython-310.pyc new file mode 100644 index 0000000..66e461c Binary files /dev/null and b/__pycache__/webpush.cpython-310.pyc differ diff --git a/application/__pycache__/__init__.cpython-310.pyc b/application/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..e6558bb Binary files /dev/null and b/application/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/__pycache__/database_payloads.cpython-310.pyc b/application/__pycache__/database_payloads.cpython-310.pyc new file mode 100644 index 0000000..f50b53a Binary files /dev/null and b/application/__pycache__/database_payloads.cpython-310.pyc differ diff --git a/application/__pycache__/postsqldb.cpython-310.pyc b/application/__pycache__/postsqldb.cpython-310.pyc new file mode 100644 index 0000000..75d85f9 Binary files /dev/null and b/application/__pycache__/postsqldb.cpython-310.pyc differ diff --git a/application/access_module/__pycache__/__init__.cpython-310.pyc b/application/access_module/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..79e2fa3 Binary files /dev/null and b/application/access_module/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/access_module/__pycache__/access_api.cpython-310.pyc b/application/access_module/__pycache__/access_api.cpython-310.pyc new file mode 100644 index 0000000..70a39d4 Binary files /dev/null and b/application/access_module/__pycache__/access_api.cpython-310.pyc differ diff --git a/application/access_module/__pycache__/access_database.cpython-310.pyc b/application/access_module/__pycache__/access_database.cpython-310.pyc new file mode 100644 index 0000000..f6b569d Binary files /dev/null and b/application/access_module/__pycache__/access_database.cpython-310.pyc differ diff --git a/application/administration/__pycache__/__init__.cpython-310.pyc b/application/administration/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..4923629 Binary files /dev/null and b/application/administration/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/administration/__pycache__/administration_api.cpython-310.pyc b/application/administration/__pycache__/administration_api.cpython-310.pyc new file mode 100644 index 0000000..aa99cf6 Binary files /dev/null and b/application/administration/__pycache__/administration_api.cpython-310.pyc differ diff --git a/application/administration/__pycache__/administration_database.cpython-310.pyc b/application/administration/__pycache__/administration_database.cpython-310.pyc new file mode 100644 index 0000000..2acbc55 Binary files /dev/null and b/application/administration/__pycache__/administration_database.cpython-310.pyc differ diff --git a/application/administration/__pycache__/administration_models.cpython-310.pyc b/application/administration/__pycache__/administration_models.cpython-310.pyc new file mode 100644 index 0000000..1836106 Binary files /dev/null and b/application/administration/__pycache__/administration_models.cpython-310.pyc differ diff --git a/application/administration/__pycache__/administration_services.cpython-310.pyc b/application/administration/__pycache__/administration_services.cpython-310.pyc new file mode 100644 index 0000000..8991c79 Binary files /dev/null and b/application/administration/__pycache__/administration_services.cpython-310.pyc differ diff --git a/application/database_postgres/BaseModel.py b/application/database_postgres/BaseModel.py index 4e345e4..be1fa42 100644 --- a/application/database_postgres/BaseModel.py +++ b/application/database_postgres/BaseModel.py @@ -29,8 +29,8 @@ class DatabaseError(Exception): with open("logs/database.log", "a+") as file: file.write("\n") file.write(f"{datetime.datetime.now()} --- ERROR --- DatabaseError(message='{self.message}',\n") - file.write(f"{" "*41}payload={self.payload},\n") - file.write(f"{" "*41}sql='{self.sql}')") + file.write(f"{' '*41}payload={self.payload},\n") + file.write(f"{' '*41}sql='{self.sql}')") def __str__(self): return f"DatabaseError(message='{self.message}', payload={self.payload}, sql='{self.sql}')" diff --git a/application/database_postgres/__pycache__/BarcodesModel.cpython-310.pyc b/application/database_postgres/__pycache__/BarcodesModel.cpython-310.pyc new file mode 100644 index 0000000..d086c88 Binary files /dev/null and b/application/database_postgres/__pycache__/BarcodesModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/BaseModel.cpython-310.pyc b/application/database_postgres/__pycache__/BaseModel.cpython-310.pyc new file mode 100644 index 0000000..6720084 Binary files /dev/null and b/application/database_postgres/__pycache__/BaseModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/BrandsModel.cpython-310.pyc b/application/database_postgres/__pycache__/BrandsModel.cpython-310.pyc new file mode 100644 index 0000000..ecf8717 Binary files /dev/null and b/application/database_postgres/__pycache__/BrandsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ConversionsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ConversionsModel.cpython-310.pyc new file mode 100644 index 0000000..2723bcd Binary files /dev/null and b/application/database_postgres/__pycache__/ConversionsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/CostLayersModel.cpython-310.pyc b/application/database_postgres/__pycache__/CostLayersModel.cpython-310.pyc new file mode 100644 index 0000000..d5e49eb Binary files /dev/null and b/application/database_postgres/__pycache__/CostLayersModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/FoodInfoModel.cpython-310.pyc b/application/database_postgres/__pycache__/FoodInfoModel.cpython-310.pyc new file mode 100644 index 0000000..26c0807 Binary files /dev/null and b/application/database_postgres/__pycache__/FoodInfoModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ItemInfoModel.cpython-310.pyc b/application/database_postgres/__pycache__/ItemInfoModel.cpython-310.pyc new file mode 100644 index 0000000..01255a0 Binary files /dev/null and b/application/database_postgres/__pycache__/ItemInfoModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ItemLocationsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ItemLocationsModel.cpython-310.pyc new file mode 100644 index 0000000..79dccb7 Binary files /dev/null and b/application/database_postgres/__pycache__/ItemLocationsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ItemsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ItemsModel.cpython-310.pyc new file mode 100644 index 0000000..d908b5c Binary files /dev/null and b/application/database_postgres/__pycache__/ItemsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/LocationsModel.cpython-310.pyc b/application/database_postgres/__pycache__/LocationsModel.cpython-310.pyc new file mode 100644 index 0000000..7734f1d Binary files /dev/null and b/application/database_postgres/__pycache__/LocationsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/LogisticsInfoModel.cpython-310.pyc b/application/database_postgres/__pycache__/LogisticsInfoModel.cpython-310.pyc new file mode 100644 index 0000000..1c971b8 Binary files /dev/null and b/application/database_postgres/__pycache__/LogisticsInfoModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/PlanEventsModel.cpython-310.pyc b/application/database_postgres/__pycache__/PlanEventsModel.cpython-310.pyc new file mode 100644 index 0000000..31af24d Binary files /dev/null and b/application/database_postgres/__pycache__/PlanEventsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/PlansModel.cpython-310.pyc b/application/database_postgres/__pycache__/PlansModel.cpython-310.pyc new file mode 100644 index 0000000..3c414e6 Binary files /dev/null and b/application/database_postgres/__pycache__/PlansModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ReceiptItemsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ReceiptItemsModel.cpython-310.pyc new file mode 100644 index 0000000..b066adb Binary files /dev/null and b/application/database_postgres/__pycache__/ReceiptItemsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ReceiptsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ReceiptsModel.cpython-310.pyc new file mode 100644 index 0000000..9c756b2 Binary files /dev/null and b/application/database_postgres/__pycache__/ReceiptsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/RecipeItemsModel.cpython-310.pyc b/application/database_postgres/__pycache__/RecipeItemsModel.cpython-310.pyc new file mode 100644 index 0000000..9ab9f12 Binary files /dev/null and b/application/database_postgres/__pycache__/RecipeItemsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/RecipesModel.cpython-310.pyc b/application/database_postgres/__pycache__/RecipesModel.cpython-310.pyc new file mode 100644 index 0000000..a7f5f1c Binary files /dev/null and b/application/database_postgres/__pycache__/RecipesModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/RolesModel.cpython-310.pyc b/application/database_postgres/__pycache__/RolesModel.cpython-310.pyc new file mode 100644 index 0000000..142300e Binary files /dev/null and b/application/database_postgres/__pycache__/RolesModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/SKUPrefixModel.cpython-310.pyc b/application/database_postgres/__pycache__/SKUPrefixModel.cpython-310.pyc new file mode 100644 index 0000000..1ac6993 Binary files /dev/null and b/application/database_postgres/__pycache__/SKUPrefixModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ShoppingListItemsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ShoppingListItemsModel.cpython-310.pyc new file mode 100644 index 0000000..40323e2 Binary files /dev/null and b/application/database_postgres/__pycache__/ShoppingListItemsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ShoppingListsModel.cpython-310.pyc b/application/database_postgres/__pycache__/ShoppingListsModel.cpython-310.pyc new file mode 100644 index 0000000..18f0c8a Binary files /dev/null and b/application/database_postgres/__pycache__/ShoppingListsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/SitesModel.cpython-310.pyc b/application/database_postgres/__pycache__/SitesModel.cpython-310.pyc new file mode 100644 index 0000000..93e9490 Binary files /dev/null and b/application/database_postgres/__pycache__/SitesModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/TransactionsModel.cpython-310.pyc b/application/database_postgres/__pycache__/TransactionsModel.cpython-310.pyc new file mode 100644 index 0000000..5186e00 Binary files /dev/null and b/application/database_postgres/__pycache__/TransactionsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/UnitsModel.cpython-310.pyc b/application/database_postgres/__pycache__/UnitsModel.cpython-310.pyc new file mode 100644 index 0000000..9a46cf6 Binary files /dev/null and b/application/database_postgres/__pycache__/UnitsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/UsersModel.cpython-310.pyc b/application/database_postgres/__pycache__/UsersModel.cpython-310.pyc new file mode 100644 index 0000000..5eab515 Binary files /dev/null and b/application/database_postgres/__pycache__/UsersModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/VendorsModel.cpython-310.pyc b/application/database_postgres/__pycache__/VendorsModel.cpython-310.pyc new file mode 100644 index 0000000..4d5a9eb Binary files /dev/null and b/application/database_postgres/__pycache__/VendorsModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/ZonesModel.cpython-310.pyc b/application/database_postgres/__pycache__/ZonesModel.cpython-310.pyc new file mode 100644 index 0000000..7746a19 Binary files /dev/null and b/application/database_postgres/__pycache__/ZonesModel.cpython-310.pyc differ diff --git a/application/database_postgres/__pycache__/__init__.cpython-310.pyc b/application/database_postgres/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..309a5c9 Binary files /dev/null and b/application/database_postgres/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/items/__pycache__/__init__.cpython-310.pyc b/application/items/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..56017c7 Binary files /dev/null and b/application/items/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/items/__pycache__/database_items.cpython-310.pyc b/application/items/__pycache__/database_items.cpython-310.pyc new file mode 100644 index 0000000..2def538 Binary files /dev/null and b/application/items/__pycache__/database_items.cpython-310.pyc differ diff --git a/application/items/__pycache__/items_API.cpython-310.pyc b/application/items/__pycache__/items_API.cpython-310.pyc new file mode 100644 index 0000000..2c65269 Binary files /dev/null and b/application/items/__pycache__/items_API.cpython-310.pyc differ diff --git a/application/items/__pycache__/items_processes.cpython-310.pyc b/application/items/__pycache__/items_processes.cpython-310.pyc new file mode 100644 index 0000000..a9558b4 Binary files /dev/null and b/application/items/__pycache__/items_processes.cpython-310.pyc differ diff --git a/application/items/__pycache__/models.cpython-310.pyc b/application/items/__pycache__/models.cpython-310.pyc new file mode 100644 index 0000000..601a9e4 Binary files /dev/null and b/application/items/__pycache__/models.cpython-310.pyc differ diff --git a/application/items/__pycache__/services.cpython-310.pyc b/application/items/__pycache__/services.cpython-310.pyc new file mode 100644 index 0000000..f50c5f1 Binary files /dev/null and b/application/items/__pycache__/services.cpython-310.pyc differ diff --git a/application/items/items_processes.py b/application/items/items_processes.py index 408f8a1..82cb81e 100644 --- a/application/items/items_processes.py +++ b/application/items/items_processes.py @@ -134,7 +134,7 @@ def postLinkedItem(site, payload): 'item_name': child_item['item_name'], 'transaction_type': 'Adjust Out', 'quantity': location['quantity_on_hand'], - 'description': f'Converted to {parent_item['barcode']}', + 'description': f"Converted to {parent_item['barcode']}", 'cost': child_item['item_info']['cost'], 'vendor': 1, 'expires': False, @@ -155,7 +155,7 @@ def postLinkedItem(site, payload): 'item_name': parent_item['item_name'], 'transaction_type': 'Adjust In', 'quantity': (float(sum_child_qoh)*float(payload['conv_factor'])), - 'description': f'Converted from {child_item['barcode']}', + 'description': f"Converted from {child_item['barcode']}", 'cost': child_item['item_info']['cost'], 'vendor': 1, 'expires': None, diff --git a/application/items/static/ItemListHandler.js b/application/items/static/itemListHandler.js similarity index 100% rename from application/items/static/ItemListHandler.js rename to application/items/static/itemListHandler.js diff --git a/application/meal_planner/__pycache__/__init__.cpython-310.pyc b/application/meal_planner/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..4f1a8de Binary files /dev/null and b/application/meal_planner/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/meal_planner/__pycache__/meal_planner_api.cpython-310.pyc b/application/meal_planner/__pycache__/meal_planner_api.cpython-310.pyc new file mode 100644 index 0000000..c1a269a Binary files /dev/null and b/application/meal_planner/__pycache__/meal_planner_api.cpython-310.pyc differ diff --git a/application/meal_planner/__pycache__/meal_planner_database.cpython-310.pyc b/application/meal_planner/__pycache__/meal_planner_database.cpython-310.pyc new file mode 100644 index 0000000..0373a12 Binary files /dev/null and b/application/meal_planner/__pycache__/meal_planner_database.cpython-310.pyc differ diff --git a/application/meal_planner/__pycache__/meal_planner_processes.cpython-310.pyc b/application/meal_planner/__pycache__/meal_planner_processes.cpython-310.pyc new file mode 100644 index 0000000..59774ac Binary files /dev/null and b/application/meal_planner/__pycache__/meal_planner_processes.cpython-310.pyc differ diff --git a/application/poe/__pycache__/__init__.cpython-310.pyc b/application/poe/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..7f23641 Binary files /dev/null and b/application/poe/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/poe/__pycache__/poe_api.cpython-310.pyc b/application/poe/__pycache__/poe_api.cpython-310.pyc new file mode 100644 index 0000000..1fb401f Binary files /dev/null and b/application/poe/__pycache__/poe_api.cpython-310.pyc differ diff --git a/application/poe/__pycache__/poe_database.cpython-310.pyc b/application/poe/__pycache__/poe_database.cpython-310.pyc new file mode 100644 index 0000000..96f440c Binary files /dev/null and b/application/poe/__pycache__/poe_database.cpython-310.pyc differ diff --git a/application/poe/__pycache__/poe_processes.cpython-310.pyc b/application/poe/__pycache__/poe_processes.cpython-310.pyc new file mode 100644 index 0000000..db50574 Binary files /dev/null and b/application/poe/__pycache__/poe_processes.cpython-310.pyc differ diff --git a/application/postsqldb.py b/application/postsqldb.py index ea0fbde..9be24ad 100644 --- a/application/postsqldb.py +++ b/application/postsqldb.py @@ -27,8 +27,8 @@ class DatabaseError(Exception): with open("logs/database.log", "a+") as file: file.write("\n") file.write(f"{datetime.datetime.now()} --- ERROR --- DatabaseError(message='{self.message}',\n") - file.write(f"{" "*41}payload={self.payload},\n") - file.write(f"{" "*41}sql='{self.sql}')") + file.write(f"{' '*41}payload={self.payload},\n") + file.write(f"{' '*41}sql='{self.sql}')") def __str__(self): return f"DatabaseError(message='{self.message}', payload={self.payload}, sql='{self.sql}')" diff --git a/application/receipts/__pycache__/__init__.cpython-310.pyc b/application/receipts/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..c6292a8 Binary files /dev/null and b/application/receipts/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/receipts/__pycache__/receipts_api.cpython-310.pyc b/application/receipts/__pycache__/receipts_api.cpython-310.pyc new file mode 100644 index 0000000..a9ba07e Binary files /dev/null and b/application/receipts/__pycache__/receipts_api.cpython-310.pyc differ diff --git a/application/receipts/__pycache__/receipts_database.cpython-310.pyc b/application/receipts/__pycache__/receipts_database.cpython-310.pyc new file mode 100644 index 0000000..60f180b Binary files /dev/null and b/application/receipts/__pycache__/receipts_database.cpython-310.pyc differ diff --git a/application/receipts/__pycache__/receipts_processes.cpython-310.pyc b/application/receipts/__pycache__/receipts_processes.cpython-310.pyc new file mode 100644 index 0000000..1b72ff4 Binary files /dev/null and b/application/receipts/__pycache__/receipts_processes.cpython-310.pyc differ diff --git a/application/receipts/receipts_api.py b/application/receipts/receipts_api.py index 21790f1..896bc39 100644 --- a/application/receipts/receipts_api.py +++ b/application/receipts/receipts_api.py @@ -44,7 +44,7 @@ def getItems(): limit = int(request.args.get('limit', 10)) site_name = session['selected_site'] offset = (page - 1) * limit - search_string = f"%{str(request.args.get('search_string', ""))}%" + search_string = f"%{str(request.args.get('search_string', ''))}%" sort_order = "item_name ASC" payload = (search_string, limit, offset, sort_order) recordset, count = receipts_database.getItemsWithQOH(site_name, payload) @@ -291,7 +291,7 @@ def resolveReceipt(): @access_api.login_required def uploadFile(receipt_id): file = request.files['file'] - file_path = current_app.config['FILES_FOLDER'] + f"/receipts/{file.filename.replace(" ", "_")}" + file_path = current_app.config['FILES_FOLDER'] + f"/receipts/{file.filename.replace(' ', '_')}" file.save(file_path) file_type, _ = mimetypes.guess_type(file.filename) preview_image = "" diff --git a/application/recipes/__pycache__/__init__.cpython-310.pyc b/application/recipes/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..29726c3 Binary files /dev/null and b/application/recipes/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/recipes/__pycache__/database_recipes.cpython-310.pyc b/application/recipes/__pycache__/database_recipes.cpython-310.pyc new file mode 100644 index 0000000..11f6585 Binary files /dev/null and b/application/recipes/__pycache__/database_recipes.cpython-310.pyc differ diff --git a/application/recipes/__pycache__/recipe_processes.cpython-310.pyc b/application/recipes/__pycache__/recipe_processes.cpython-310.pyc new file mode 100644 index 0000000..ccde8ac Binary files /dev/null and b/application/recipes/__pycache__/recipe_processes.cpython-310.pyc differ diff --git a/application/recipes/__pycache__/recipes_api.cpython-310.pyc b/application/recipes/__pycache__/recipes_api.cpython-310.pyc new file mode 100644 index 0000000..d0f8b0f Binary files /dev/null and b/application/recipes/__pycache__/recipes_api.cpython-310.pyc differ diff --git a/application/recipes/recipes_api.py b/application/recipes/recipes_api.py index 2ea447c..c14e069 100644 --- a/application/recipes/recipes_api.py +++ b/application/recipes/recipes_api.py @@ -189,7 +189,7 @@ def postNewSKUItem(): @access_api.login_required def uploadImage(recipe_id): file = request.files['file'] - file_path = current_app.config['UPLOAD_FOLDER'] + f"/recipes/{file.filename.replace(" ", "_")}" + file_path = current_app.config['UPLOAD_FOLDER'] + f"/recipes/{file.filename.replace(' ', '_')}" file.save(file_path) site_name = session['selected_site'] database_recipes.postUpdateRecipe(site_name, {'id': recipe_id, 'update': {'picture_path': file.filename.replace(" ", "_")}}) @@ -212,7 +212,7 @@ def deleteRecipeItem(): site_name = session['selected_site'] deleted_item = database_recipes.postDeleteRecipeItem(site_name, (id, )) recipe = database_recipes.getRecipe(site_name, (int(deleted_item['rp_id']),)) - return jsonify({'recipe': recipe, 'error': False, 'message': f'Recipe Item {deleted_item['item_name']} was deleted successful!'}) + return jsonify({'recipe': recipe, 'error': False, 'message': f"Recipe Item {deleted_item['item_name']} was deleted successful!"}) return jsonify({'recipe': recipe, 'error': True, 'message': f'method {request.method} is not allowed!'}) @recipes_api.route('/api/saveRecipeItem', methods=["POST"]) @@ -225,7 +225,7 @@ def saveRecipeItem(): site_name = session['selected_site'] updated_line = database_recipes.postUpdateRecipeItem(site_name, {'id': id, 'update': update}) recipe = database_recipes.getRecipe(site_name, (int(updated_line['rp_id']), )) - return jsonify({'recipe': recipe, 'error': False, 'message': f'Recipe Item {updated_line['item_name']} was updated successful!'}) + return jsonify({'recipe': recipe, 'error': False, 'message': f"Recipe Item {updated_line['item_name']} was updated successful!"}) return jsonify({'recipe': recipe, 'error': True, 'message': f'method {request.method} not allowed!'}) @recipes_api.route('/api/receiptRecipe', methods=["POST"]) diff --git a/application/shoppinglists/__pycache__/__init__.cpython-310.pyc b/application/shoppinglists/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..975e272 Binary files /dev/null and b/application/shoppinglists/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/shoppinglists/__pycache__/shoplist_api.cpython-310.pyc b/application/shoppinglists/__pycache__/shoplist_api.cpython-310.pyc new file mode 100644 index 0000000..4054886 Binary files /dev/null and b/application/shoppinglists/__pycache__/shoplist_api.cpython-310.pyc differ diff --git a/application/shoppinglists/__pycache__/shoplist_database.cpython-310.pyc b/application/shoppinglists/__pycache__/shoplist_database.cpython-310.pyc new file mode 100644 index 0000000..3ab341a Binary files /dev/null and b/application/shoppinglists/__pycache__/shoplist_database.cpython-310.pyc differ diff --git a/application/shoppinglists/__pycache__/shoplist_processess.cpython-310.pyc b/application/shoppinglists/__pycache__/shoplist_processess.cpython-310.pyc new file mode 100644 index 0000000..4b74955 Binary files /dev/null and b/application/shoppinglists/__pycache__/shoplist_processess.cpython-310.pyc differ diff --git a/application/site_management/__pycache__/__init__.cpython-310.pyc b/application/site_management/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..4d81e86 Binary files /dev/null and b/application/site_management/__pycache__/__init__.cpython-310.pyc differ diff --git a/application/site_management/__pycache__/site_management_api.cpython-310.pyc b/application/site_management/__pycache__/site_management_api.cpython-310.pyc new file mode 100644 index 0000000..32a6a4f Binary files /dev/null and b/application/site_management/__pycache__/site_management_api.cpython-310.pyc differ diff --git a/application/site_management/__pycache__/site_management_database.cpython-310.pyc b/application/site_management/__pycache__/site_management_database.cpython-310.pyc new file mode 100644 index 0000000..513f327 Binary files /dev/null and b/application/site_management/__pycache__/site_management_database.cpython-310.pyc differ diff --git a/database.py b/database.py index 8441094..131f92a 100644 --- a/database.py +++ b/database.py @@ -17,8 +17,8 @@ class DatabaseError(Exception): with open("database.log", "a+") as file: file.write("\n") file.write(f"{datetime.now()} --- ERROR --- DatabaseError(message='{self.message}',\n") - file.write(f"{" "*41}payload={self.payload},\n") - file.write(f"{" "*41}sql='{self.sql}')") + file.write(f"{' '*41}payload={self.payload},\n") + file.write(f"{' '*41}sql='{self.sql}')") def __str__(self): return f"DatabaseError(message='{self.message}', payload={self.payload}, sql='{self.sql}')" diff --git a/main.py b/main.py index 11a866a..9870f63 100644 --- a/main.py +++ b/main.py @@ -328,7 +328,7 @@ def add_food_item(site_name: str, barcode: str, name: str, payload: dict): # TODO: I need to validate the name so that it doesnt have characters against the SQL database schema such as ' defaults = config(filename=f"sites/{site_name}/site.ini", section="defaults") - uuid = f"{defaults["default_zone"]}@{defaults["default_primary_location"]}" + uuid = f"{defaults['default_zone']}@{defaults['default_primary_location']}" name = name.replace("'", "@&apostraphe&") payload["logistics_info"]["primary_location"] = uuid payload["logistics_info"]["auto_issue_location"] = uuid diff --git a/postsqldb.py b/postsqldb.py index 81ee6bf..3602f27 100644 --- a/postsqldb.py +++ b/postsqldb.py @@ -17,8 +17,8 @@ class DatabaseError(Exception): with open("database.log", "a+") as file: file.write("\n") file.write(f"{datetime.datetime.now()} --- ERROR --- DatabaseError(message='{self.message}',\n") - file.write(f"{" "*41}payload={self.payload},\n") - file.write(f"{" "*41}sql='{self.sql}')") + file.write(f"{' '*41}payload={self.payload},\n") + file.write(f"{' '*41}sql='{self.sql}')") def __str__(self): return f"DatabaseError(message='{self.message}', payload={self.payload}, sql='{self.sql}')"