This exception is thrown when the admin tries to award points to a user from the Django admin.
This is because when saving the AwardedPointValue model, the points field (which is an Integer field) is NULL, which has the NOT NULL constraint.
I fixed this by adding a clean method in the AwardedPointValue, checking if the points value is null (None). If so, then it will replace the Null value with the value of the points key (value foreign key).
I tested this on my own project, and it worked. Will do more testing....
This is my first pull request to a project. I do not know how to do the testing stuff like TravisCl and such.
This exception is thrown when the admin tries to award points to a user from the Django admin.
This is because when saving the AwardedPointValue model, the points field (which is an Integer field) is NULL, which has the NOT NULL constraint.
I fixed this by adding a
clean
method in the AwardedPointValue, checking if the points value is null (None). If so, then it will replace the Null value with the value of the points key (value foreign key).I tested this on my own project, and it worked. Will do more testing....
This is my first pull request to a project. I do not know how to do the testing stuff like TravisCl and such.