Removed default values of one from ProposalResult denormalized fields
The original default value of one assumed ProposalResult was being created when a Review was created which meant a comment and a vote was made. This is no longer the case from changes after the original change and has caused off by one errors in the denormalized count.
This commit is contained in:
		
							parent
							
								
									f9f218ec94
								
							
						
					
					
						commit
						7c6970fc3d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -198,8 +198,8 @@ class LatestVote(models.Model): | |||
| class ProposalResult(models.Model): | ||||
|     proposal = models.OneToOneField("proposals.ProposalBase", related_name="result") | ||||
|     score = models.DecimalField(max_digits=5, decimal_places=2, default=Decimal("0.00")) | ||||
|     comment_count = models.PositiveIntegerField(default=1) | ||||
|     vote_count = models.PositiveIntegerField(default=1) | ||||
|     comment_count = models.PositiveIntegerField(default=0) | ||||
|     vote_count = models.PositiveIntegerField(default=0) | ||||
|     plus_one = models.PositiveIntegerField(default=0) | ||||
|     plus_zero = models.PositiveIntegerField(default=0) | ||||
|     minus_zero = models.PositiveIntegerField(default=0) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brian Rosner
						Brian Rosner