Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null check in sql preventing null to int conversion error (#1215) #1358

Merged
merged 7 commits into from
Jun 12, 2024

Conversation

karjo24
Copy link
Contributor

@karjo24 karjo24 commented Jun 5, 2024

Motivation and Context

fixes #1215. Currently, the server throws a "cannot convert null to int"-error on the stats page, when no student has watched any vod or stream of this course yet. This is because there is no entry in the database referring to this specific course.

Description

Null check in SQL, returns 0 instead of null.

Steps for Testing

Prerequisites:
default testing database

Steps:

  1. Before applying changes, go to http://localhost:8081/admin/course/1/stats. See that the "Vod Views" and "Live Views" show a loading indicator and a server error is thrown as described in issue.
  2. Apply change
  3. Reload, note that 0 is shown instead of loading indicator and no error is thrown.

@karjo24 karjo24 linked an issue Jun 5, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jun 5, 2024

Your Testserver will be ready at https://1358.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

@SebiWrn SebiWrn self-requested a review June 5, 2024 15:01
@SebiWrn SebiWrn merged commit eace094 into dev Jun 12, 2024
5 of 8 checks passed
@SebiWrn SebiWrn deleted the 1215-statistics-vod-view-count-broken branch June 12, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Statistics: VoD view count broken
2 participants