Fix: Categories Edit - nullable bool conversion error
Fixed type conversion error in Categories/Edit.cshtml where Model.IsActive (bool?) was being evaluated in a ternary operator that requires non-nullable bool. Changed from: @(Model.IsActive ? "checked" : "") To: @(Model.IsActive == true ? "checked" : "") This properly handles null, false, and true values for the checkbox. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
125513dbc6
commit
5552917f0d
@ -38,7 +38,7 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<input name="IsActive" id="IsActive" class="form-check-input" type="checkbox" @(Model.IsActive ? "checked" : "") />
|
||||
<input name="IsActive" id="IsActive" class="form-check-input" type="checkbox" @(Model.IsActive == true ? "checked" : "") />
|
||||
<label for="IsActive" class="form-check-label">
|
||||
Active
|
||||
</label>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user