parent
3044f8ecbd
commit
541764d87b
1 changed files with 9 additions and 4 deletions
|
@ -97,8 +97,13 @@ PRIORITY_LEVELS = {
|
|||
|
||||
|
||||
def get_priority_for_index(index):
|
||||
try:
|
||||
int_index = int(index)
|
||||
except ValueError:
|
||||
return 'Unknown'
|
||||
|
||||
for priority in PRIORITY_LEVELS:
|
||||
if PRIORITY_LEVELS[priority]['index'] == index:
|
||||
if PRIORITY_LEVELS[priority]['index'] == int_index:
|
||||
return priority
|
||||
|
||||
return 'Unknown'
|
Reference in a new issue