fix: issue vote constraints (#2057)

This commit is contained in:
Nikhil 2023-09-01 18:46:38 +05:30 committed by GitHub
parent f71a62f142
commit 71c8f79276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -32,19 +32,11 @@ class Migration(migrations.Migration):
field=models.CharField(blank=True, max_length=255, null=True), field=models.CharField(blank=True, max_length=255, null=True),
), ),
migrations.RunPython(update_user_timezones), migrations.RunPython(update_user_timezones),
migrations.AlterUniqueTogether(
name='issuevote',
unique_together=set(),
),
migrations.AlterField( migrations.AlterField(
model_name='issuevote', model_name='issuevote',
name='vote', name='vote',
field=models.IntegerField(choices=[(-1, 'DOWNVOTE'), (1, 'UPVOTE')], default=1), field=models.IntegerField(choices=[(-1, 'DOWNVOTE'), (1, 'UPVOTE')], default=1),
), ),
migrations.AlterUniqueTogether(
name='issuevote',
unique_together={('issue', 'actor', 'vote')},
),
migrations.CreateModel( migrations.CreateModel(
name='ProjectPublicMember', name='ProjectPublicMember',
fields=[ fields=[

View File

@ -481,7 +481,7 @@ class IssueVote(ProjectBaseModel):
) )
class Meta: class Meta:
unique_together = ["issue", "actor", "vote"] unique_together = ["issue", "actor",]
verbose_name = "Issue Vote" verbose_name = "Issue Vote"
verbose_name_plural = "Issue Votes" verbose_name_plural = "Issue Votes"
db_table = "issue_votes" db_table = "issue_votes"