This commit is contained in:
Jake Kasper
2025-08-27 10:19:40 -04:00
parent e5ef98043f
commit afd701df22

View File

@@ -151,14 +151,13 @@ const Applications = () => {
// Get the property ID from the application // Get the property ID from the application
const propertyId = application.property?.id || application.section?.propertyId; const propertyId = application.property?.id || application.section?.propertyId;
// Also fetch the property details if we don't have them and we have a valid property ID // Try to fetch property details if we have a valid property ID
if (!selectedPropertyDetails || (propertyId && selectedPropertyDetails.id !== propertyId)) { if (propertyId && (!selectedPropertyDetails || selectedPropertyDetails.id !== propertyId)) {
if (propertyId) {
await fetchPropertyDetails(propertyId); await fetchPropertyDetails(propertyId);
} else { } else if (!propertyId) {
console.warn('No property ID found for application:', application); console.warn('No property ID found for application:', application);
toast.warning('No property associated with this application'); // Clear any existing property details since this application doesn't have property info
} setSelectedPropertyDetails(null);
} }
setShowExecutionModal(true); setShowExecutionModal(true);