Skip to content

Commit

Permalink
use get function to get forum post view url
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3D3V committed Sep 24, 2024
1 parent 6a67979 commit 4670ba8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions moodle_dl/moodle/mods/forum.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ async def load_files_of_discussion(self, discussion: Dict) -> List[Dict]:
is_file=False,
)

if 'urls' in post:
post_url = post['urls'].get('view')
post_url = post.get('urls', {}).get('view', None)

result.append(
{
Expand Down

0 comments on commit 4670ba8

Please sign in to comment.