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

fix: rating to use db primary key #257

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions agagd/agagd_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ class Meta:


class Rating(models.Model):

# Sets a primary key.
id = models.BigAutoField(primary_key=True)

# ForeignKey for the Members
pin_player = models.ForeignKey(
Member,
Expand All @@ -278,7 +274,7 @@ class Rating(models.Model):
related_name="ratings_set",
on_delete=models.DO_NOTHING,
)

id = models.IntegerField(db_column="id", primary_key=True)
rating = models.FloatField(db_column="Rating") # x. This field type is a guess.
sigma = models.FloatField(db_column="Sigma") # x. This field type is a guess.
elab_date = models.DateField(db_column="Elab_Date")
Expand Down