Skip to content

Commit

Permalink
Merge pull request #927 from Benbb96/fix-926
Browse files Browse the repository at this point in the history
Fix #926, TicketCustomFieldValue Boolean (if not required) does not set in EditTicketForm
  • Loading branch information
gwasser committed Jan 16, 2021
2 parents 56c3c66 + f9d000b commit aeb3bf0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpdesk/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def __init__(self, *args, **kwargs):
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 = {
Expand Down

0 comments on commit aeb3bf0

Please sign in to comment.