Allow diabling osTicket integration per run
This commit is contained in:
parent
dd13f7bd24
commit
aae7c1d543
1 changed files with 8 additions and 3 deletions
|
|
@ -142,11 +142,16 @@ def get_osticket_number():
|
|||
"""Get ticket number and confirm with name from osTicket DB."""
|
||||
ticket_number = None
|
||||
if not ost_db['Cursor']:
|
||||
# No DB access, just set it to 0
|
||||
return 0
|
||||
# No DB access, return None to disable integration
|
||||
return None
|
||||
while ticket_number is None:
|
||||
print_standard(' ')
|
||||
_input = input('Enter ticket number: ')
|
||||
_input = input('Enter ticket number (or leave blank to disable): ')
|
||||
if re.match(r'^\s*$', _input):
|
||||
if ask('Disable osTicket integration for this run?'):
|
||||
return None
|
||||
else:
|
||||
continue
|
||||
if not re.match(r'^([0-9]+)$', _input):
|
||||
continue
|
||||
_name = osticket_get_ticket_name(_input)
|
||||
|
|
|
|||
Loading…
Reference in a new issue