Fix model to actually initialize

This commit is contained in:
Joseph Schorr 2016-07-12 15:09:31 -04:00 committed by Jimmy Zelinskie
parent 8435c254c3
commit 94d71f2166

View file

@ -1006,7 +1006,7 @@ class BlobPlacementLocation(BaseModel):
class BlobPlacementLocationPreference(BaseModel):
""" BlobPlacementLocationPreference is a location to which a user's data will be replicated. """
user = QuayUserField(index=True, allow_robots=False)
user = QuayUserField(index=True, allows_robots=False)
location = ForeignKeyField(BlobPlacementLocation)
@ -1124,9 +1124,9 @@ class DerivedImage(BaseModel):
source_manifest = ForeignKeyField(Manifest)
derived_manifest_json = JSONField()
media_type = ForeignKeyField(MediaType)
blob = ForeignKeyField(Blob)
blob = ForeignKeyField(Blob, related_name='blob')
uniqueness_hash = CharField(index=True, unique=True)
signature_blob = ForeignKeyField(Blob, null=True)
signature_blob = ForeignKeyField(Blob, null=True, related_name='signature_blob')
class Meta:
database = db
@ -1154,7 +1154,7 @@ class Tag(BaseModel):
(('repository', 'name'), False),
# This unique index prevents deadlocks when concurrently moving and deleting tags
(('repository', 'name', 'lifetime_end_ts'), True),
(('repository', 'name', 'lifetime_end'), True),
)