Merge pull request #902 from jakedt/notransitive

Image parents do not have to be nulled transitively on repo delete
This commit is contained in:
Jake Moshenko 2015-11-17 16:53:13 -05:00
commit 206ffc65af

View file

@ -349,7 +349,8 @@ 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}
skip_transitive_deletes = {RepositoryTag, RepositoryBuild, RepositoryBuildTrigger, BlobUpload,
Image}
# We need to sort the ops so that models get cleaned in order of their dependencies
ops = reversed(list(self.dependencies(delete_nullable)))