mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-12 18:00:45 +01:00
Merge pull request #927 from Benbb96/fix-926
Fix #926, TicketCustomFieldValue Boolean (if not required) does not set in EditTicketForm
This commit is contained in:
commit
aeb3bf0762
@ -98,6 +98,9 @@ class EditTicketForm(CustomFieldMixin, forms.ModelForm):
|
||||
try:
|
||||
current_value = TicketCustomFieldValue.objects.get(ticket=self.instance, field=field)
|
||||
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:
|
||||
initial_value = None
|
||||
instanceargs = {
|
||||
|
Loading…
Reference in New Issue
Block a user