Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Add complete field
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Jan 16, 2018
1 parent 0b5e747 commit cb9351d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pulpcore/pulpcore/app/models/repository.py
Expand Up @@ -239,6 +239,8 @@ class RepositoryVersion(Model):
1 + the most recent version.
created (models.DateTimeField): When the version was created.
action (models.TextField): The action that produced the version.
complete (models.BooleanField): False indicates that the Repository Version is still being
created, or the task failed before completion.
Relations:
Expand All @@ -247,6 +249,7 @@ class RepositoryVersion(Model):
repository = models.ForeignKey(Repository)
number = models.PositiveIntegerField(db_index=True)
created = models.DateTimeField(auto_now_add=True)
complete = models.BooleanField(default=False)

class Meta:
default_related_name = 'versions'
Expand Down
2 changes: 1 addition & 1 deletion pulpcore/pulpcore/app/viewsets/repository.py
Expand Up @@ -130,7 +130,7 @@ class RepositoryVersionViewSet(GenericNamedModelViewSet,
parent_viewset = RepositoryViewSet
parent_lookup_kwargs = {'repository_pk': 'repository__pk'}
serializer_class = RepositoryVersionSerializer
queryset = RepositoryVersion.objects.all()
queryset = RepositoryVersion.objects.exclude(complete=False)

@decorators.detail_route()
def content(self, request, repository_pk, number):
Expand Down

0 comments on commit cb9351d

Please sign in to comment.