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

ensure the user field in categorizers table is one to one #148

Merged
merged 10 commits into from
Dec 1, 2021
3 changes: 2 additions & 1 deletion ponder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def email_categorizer(self):
class Categorizer(models.Model):
name = models.CharField(unique=True, max_length=254)
initials = models.CharField(unique=True, max_length=3)
user = models.CharField(max_length=254)
#user = models.CharField(max_length=254)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this line instead of commenting.

user = models.OneToOneField(User, to_field="username", db_column='user', on_delete=models.DO_NOTHING)

class Meta:
db_table = 'categorizers'
Expand Down