Merge pull request #2446 from jzelinskie/fix-deletes

data.database: beta classes skip transitive delete
This commit is contained in:
Jimmy Zelinskie 2017-03-20 18:48:08 -04:00 committed by GitHub
commit 81b01aa263

View file

@ -452,7 +452,7 @@ class User(BaseModel):
TagManifest, AccessToken, OAuthAccessToken, BlobUpload,
RepositoryNotification, OAuthAuthorizationCode,
RepositoryActionCount, TagManifestLabel, Tag,
ManifestLabel, BlobUploading}
ManifestLabel, BlobUploading} | beta_classes
delete_instance_filtered(self, User, delete_nullable, skip_transitive_deletes)
@ -571,7 +571,7 @@ class Repository(BaseModel):
# These models don't need to use transitive deletes, because the referenced objects
# are cleaned up directly
skip_transitive_deletes = {RepositoryTag, RepositoryBuild, RepositoryBuildTrigger, BlobUpload,
Image, TagManifest, TagManifestLabel, Label, DerivedStorageForImage}
Image, TagManifest, TagManifestLabel, Label, DerivedStorageForImage} | beta_classes
delete_instance_filtered(self, Repository, delete_nullable, skip_transitive_deletes)