Skip to content

Commit

Permalink
Fix uuid4 length bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwakftw authored Sep 9, 2020
1 parent 4f7c95a commit 2439d30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions judge/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Submission(models.Model):
Model for a Submission.
"""
# Self Generated PrimaryKey
id = models.CharField(max_length=32, primary_key=True, default=uuid4)
id = models.CharField(max_length=36, primary_key=True, default=uuid4)

problem = models.ForeignKey(Problem, on_delete=models.CASCADE)
"""Foreign key to problem for which this is a submission"""
Expand Down Expand Up @@ -290,7 +290,7 @@ class Comment(models.Model):
"""Foreign key to person"""

# Self Generated PrimaryKey
id = models.CharField(max_length=32, primary_key=True, default=uuid4)
id = models.CharField(max_length=36, primary_key=True, default=uuid4)

commenter = models.ForeignKey(
Person, on_delete=models.CASCADE, related_name='commenter')
Expand Down

0 comments on commit 2439d30

Please sign in to comment.