Format demo purge for Jenkins lint
This commit is contained in:
@@ -76,11 +76,7 @@ class Command(BaseCommand):
|
|||||||
"template",
|
"template",
|
||||||
]
|
]
|
||||||
|
|
||||||
qs = (
|
qs = Page.objects.exclude(depth=1).exclude(slug__in=["home"]).specific()
|
||||||
Page.objects.exclude(depth=1)
|
|
||||||
.exclude(slug__in=["home"])
|
|
||||||
.specific()
|
|
||||||
)
|
|
||||||
|
|
||||||
candidates = []
|
candidates = []
|
||||||
for page in qs:
|
for page in qs:
|
||||||
@@ -142,7 +138,9 @@ class Command(BaseCommand):
|
|||||||
try:
|
try:
|
||||||
for product in iterable:
|
for product in iterable:
|
||||||
removed += 1
|
removed += 1
|
||||||
self.stdout.write(f"PRODUCT delete id={product.id} title={product.title}")
|
self.stdout.write(
|
||||||
|
f"PRODUCT delete id={product.id} title={product.title}"
|
||||||
|
)
|
||||||
product.delete()
|
product.delete()
|
||||||
finally:
|
finally:
|
||||||
register_signal_handlers()
|
register_signal_handlers()
|
||||||
|
|||||||
Reference in New Issue
Block a user