Changeset 3662
- Timestamp:
- 05/11/08 23:04:49 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ticketvalidatorplugin/0.11/src/ticketvalidator/core.py
r3656 r3662 32 32 """Check if 'value' is empty. 33 33 34 :param :valuethe value to check35 :type :valueobject"""34 :param value: the value to check 35 :type value: object""" 36 36 37 if value ==None:37 if value is None: 38 38 return True 39 39 … … 48 48 49 49 def validate_ticket(self, req, ticket): 50 """Validate a ticket after it's been populated from user input. 51 52 Must return a list of `(field, message)` tuples, one for each problem 53 detected. `field` can be `None` to indicate an overall problem with the 54 ticket. Therefore, a return value of `[]` means everything is OK.""" 50 """Make sure required fields for the next state have been 51 the ticket will be in have been entered.""" 55 52 56 53 state = self._get_state(req, ticket) 57 54 58 self.log.info('old state = %s, new state = %s' %(ticket['status'], state)) 55 # state not changed, no need to re-check 56 if state is None: 57 return [] 59 58 60 59 required_fields = self.config.getlist('ticketvalidator', ticketvalidatorplugin/0.11/src/ticketvalidator/__init__.py
r3656 r3662 19 19 # along with TicketValidator. If not, see 20 20 # <http://www.gnu.org/licenses/>. 21 22 __docformat__ = 'restructuredtext en'
