Commits

Jun Omae committed 21fb4f2 Draft

Fixed the wrong validation for `complete` field (sf.jp #25761).

  • Participants
  • Parent commits f643568

Comments (0)

Files changed (1)

ganttcalendar/ganttcalendar/ticketgantt.py

 #from trac.util.translation import _
 from trac.config import IntOption, BoolOption, Option
 from trac import __version__
+from trac.util.compat import any
 from trac.util.translation import domain_functions
 
 
         show_ticket_status = req.args.get('show_ticket_status')
 
         ts = TicketSystem(self.env)
-        if not 'complete' in ts.get_custom_fields():
+        if not any(f['name'] == 'complete' for f in ts.get_custom_fields()):
             add_warning(req, _("'complete' field is not defined. Please define it."))
         normal_mode  = req.args.get('normal')
         current_mode = req.args.get('zoom')