mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-23 22:38:43 +01:00
Fix #926
This commit is contained in:
parent
56c3c66a35
commit
f9d000b953
@ -98,6 +98,9 @@ class EditTicketForm(CustomFieldMixin, forms.ModelForm):
|
|||||||
try:
|
try:
|
||||||
current_value = TicketCustomFieldValue.objects.get(ticket=self.instance, field=field)
|
current_value = TicketCustomFieldValue.objects.get(ticket=self.instance, field=field)
|
||||||
initial_value = current_value.value
|
initial_value = current_value.value
|
||||||
|
# If it is boolean field, transform the value to a real boolean instead of a string
|
||||||
|
if current_value.field.data_type == 'boolean':
|
||||||
|
initial_value = initial_value == 'True'
|
||||||
except TicketCustomFieldValue.DoesNotExist:
|
except TicketCustomFieldValue.DoesNotExist:
|
||||||
initial_value = None
|
initial_value = None
|
||||||
instanceargs = {
|
instanceargs = {
|
||||||
|
Loading…
Reference in New Issue
Block a user