mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-22 03:51:53 +00:00
fix(ResourceTagMapping): PRWLR-5271 set CASCADE for resource field (#80)
This commit is contained in:
committed by
GitHub
parent
95dc87a91b
commit
3efdfad37d
@@ -794,7 +794,7 @@ class Migration(migrations.Migration):
|
||||
(
|
||||
"resource",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.DO_NOTHING,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="api.resource",
|
||||
),
|
||||
),
|
||||
|
||||
@@ -450,7 +450,7 @@ class ResourceTagMapping(RowLevelSecurityProtectedModel):
|
||||
# NOTE that we don't really need a primary key here,
|
||||
# but everything is easier with django if we do
|
||||
id = models.UUIDField(primary_key=True, default=uuid4, editable=False)
|
||||
resource = models.ForeignKey(Resource, on_delete=models.DO_NOTHING)
|
||||
resource = models.ForeignKey(Resource, on_delete=models.CASCADE)
|
||||
tag = models.ForeignKey(ResourceTag, on_delete=models.CASCADE)
|
||||
|
||||
class Meta(RowLevelSecurityProtectedModel.Meta):
|
||||
|
||||
Reference in New Issue
Block a user