Commit f3a5802
committed
fix(ui): handle None values for entry_date and contract_type in employee detail
Fix crash when viewing employee details if entry_date or contract_type
are None (now optional fields).
Changes:
- Add None check for contract_type before displaying
- Add None check for entry_date before calling strftime()
This prevents the error: "NoneType has no attribute strftime"
when viewing employees without entry date or contract type.
Fixes crash introduced when making these fields optional.1 parent 8d464ba commit f3a5802
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | 163 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
0 commit comments