Skip to content

Commit

Permalink
Fix evaluate version
Browse files Browse the repository at this point in the history
  • Loading branch information
edudouglas committed May 6, 2019
1 parent 618a9c5 commit f3f4611
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,10 +1394,8 @@ class Meta:
auto_now_add=True)

def save(self, *args, **kwargs):
version_number = RepositoryEvaluateResult.objects.filter(
repository_update=self.repository_update
).count()
self.version = version_number + 1
repository = self.repository_update.repository
self.version = repository.evaluations_results().count() + 1
return super().save(*args, **kwargs)


Expand Down

0 comments on commit f3f4611

Please sign in to comment.