From 364f0302a97cb0f16032554138b69095204c2d7b Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 10 Jul 2025 10:27:05 +0200 Subject: [PATCH] fix error when no profile picture --- Frontend/lib/mih_services/mih_business_details_services.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Frontend/lib/mih_services/mih_business_details_services.dart b/Frontend/lib/mih_services/mih_business_details_services.dart index 5049c148..7e5f0cf1 100644 --- a/Frontend/lib/mih_services/mih_business_details_services.dart +++ b/Frontend/lib/mih_services/mih_business_details_services.dart @@ -69,6 +69,9 @@ class MihBusinessDetailsServices { return const Mihloadingcircle(); }, ); + String logoPath = businessLogoFilename.isNotEmpty + ? "$appId/business_files/$businessLogoFilename" + : ""; var response = await http.post( Uri.parse("${AppEnviroment.baseApiUrl}/business/insert/"), headers: { @@ -79,7 +82,7 @@ class MihBusinessDetailsServices { "type": businessType, "registration_no": businessRegistrationNo, "logo_name": businessLogoFilename, - "logo_path": "$appId/business_files/$businessLogoFilename", + "logo_path": logoPath, "contact_no": businessPhoneNumber, "bus_email": businessEmail, "gps_location": businessLocation,