fix: 修正當週物件無連結時的情況
This commit is contained in:
parent
397e28a62c
commit
0d9b40cd94
@ -122,7 +122,7 @@ class MoodleAPI():
|
|||||||
return [{
|
return [{
|
||||||
'name': " ".join( link.text.split(' ')[:-1] ),
|
'name': " ".join( link.text.split(' ')[:-1] ),
|
||||||
'type': link.text.split(' ')[-1],
|
'type': link.text.split(' ')[-1],
|
||||||
'link': link.find('a').get('href')
|
'link': link.find('a').get('href') if link.find('a') != None else ""
|
||||||
} for link in links]
|
} for link in links]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user