Skip to content

Commit

Permalink
fix: created at none case (#36117)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzhou-bit authored Jan 15, 2025
1 parent 4a2c148 commit 2aeddf6
Showing 1 changed file with 1 addition and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,44 +183,9 @@ def get(self, request: Request, course_id: str):
# Wasn't JSON, just use the value as a string
pass

# print('DTO')
# print(broken_links_dto)

# mock dto for testing
# broken_links_dto = {
# 'sections': [
# {
# 'id': 'sectid',
# 'displayName': 'sectname',
# 'subsections': [
# {
# 'id': 'subid',
# 'displayName': 'subname',
# 'units': [
# {
# 'id': 'unitid',
# 'displayName': 'unitname',
# 'blocks': [
# {
# 'id': 'blockid',
# 'displayName': 'blockname',
# 'url': 'blockurl',
# 'brokenLinks': [
# 'link1',
# 'link2',
# ],
# },
# ],
# }
# ]
# }
# ]
# }
# ]
# }
data = {
'LinkCheckStatus': status,
'LinkCheckCreatedAt': created_at,
**({'LinkCheckCreatedAt': created_at} if created_at else {}),
**({'LinkCheckOutput': broken_links_dto} if broken_links_dto else {}),
**({'LinkCheckError': error} if error else {})
}
Expand Down

0 comments on commit 2aeddf6

Please sign in to comment.