4.2 KiB
Hotfix Deployment - February 12, 2026
Issues Fixed
Issue 1: Internal Server Error on Contact Creation ❌ → ✅
Problem: Foreign key constraint violation when creating contacts
Root Cause: Form was sending empty string "" for parentId field instead of undefined
Fix: Updated ContactForm to:
- Use
undefinedfor optional fields instead of empty strings - Clean data before submission to remove empty optional fields
- Properly handle
parentIdfield
File Modified: frontend/src/components/contacts/ContactForm.tsx
Issue 2: Category Checkboxes Not Clickable ❌ → ✅
Problem: Checkboxes in category selector didn't respond to clicks
Root Cause: Checkbox was a non-interactive div element
Fix: Changed checkbox from div to button with proper click handler
File Modified: frontend/src/components/contacts/CategorySelector.tsx
Deployment Details
Time: 12:04 CET, February 12, 2026
Method: Hot fix deployment (frontend rebuild only)
Downtime: ~15 seconds (frontend restart)
Status: ✅ Deployed and running
How to Test
1. Test Contact Creation (Previously Failing)
-
Login at https://zerp.atmata-group.com
- Email:
gm@atmata.com - Password:
Admin@123
- Email:
-
Go to Contacts page
-
Click "Add Contact"
-
Fill in the required fields:
- Contact Type: Individual
- Source: Website
- Name: Test Contact
-
✅ Click "Create Contact"
-
✅ Verify contact is created successfully (no more error)
2. Test Category Selection (Previously Not Working)
- Click "Add Contact" again
- Scroll down to "Categories" section
- ✅ Click on any checkbox (Client, Partner, or Supplier)
- ✅ Verify checkbox becomes selected (blue background)
- ✅ Verify selected category appears as a chip above the tree
- ✅ Click the X on the chip to remove selection
3. Test Category Creation
- In Categories section, click the "+" button
- Enter category name (e.g., "VIP Customer")
- Click "Add Category"
- ✅ Verify category appears in the tree
- ✅ Click checkbox to select it
- ✅ Create contact with the category assigned
Fixed Code Changes
ContactForm.tsx - Data Cleaning
// Before (BROKEN)
parentId: contact?.parent?.id || '', // Empty string causes DB error
// After (FIXED)
parentId: contact?.parent?.id, // undefined if not present
// Added data cleaning before submit
const cleanData = Object.entries({ ...formData, rating }).reduce((acc, [key, value]) => {
if (value !== '' || ['type', 'name', 'source', 'country'].includes(key)) {
acc[key] = value
}
return acc
}, {} as any)
CategorySelector.tsx - Interactive Checkbox
// Before (BROKEN)
<div className="..."> {/* Not clickable */}
{isSelected && <Check />}
</div>
// After (FIXED)
<button
type="button"
onClick={(e) => {
e.stopPropagation()
toggleSelect(category.id)
}}
className="... cursor-pointer"
>
{isSelected && <Check />}
</button>
Services Status
✅ Frontend: Running (Ready in 89ms)
✅ Backend: Running
✅ Database: Running (3 users seeded)
Verification Checklist
- Frontend rebuilt with fixes
- Frontend restarted
- Service responding (89ms ready time)
- Contact creation tested by user
- Category selection tested by user
Known Working Features
After this fix, all the following should work:
✅ Login with gm@atmata.com
✅ View contacts list
✅ Create contacts (all fields)
✅ Select categories (checkboxes now work)
✅ Assign multiple categories
✅ Add tags
✅ Set rating
✅ Export contacts
✅ View contact details
✅ Edit contacts
✅ View history
If You Still Have Issues
-
Clear browser cache: Press
Ctrl+Shift+R(orCmd+Shift+Ron Mac) -
Check backend logs:
ssh root@37.60.249.71 cd /root/z_crm docker-compose logs backend --tail=50 -
Restart all services (if needed):
ssh root@37.60.249.71 cd /root/z_crm docker-compose restart
Status: ✅ Fixed and Deployed
Ready for Testing: Now
Please test creating a contact with categories and let me know if it works!