some util to clean empty categories
This commit is contained in:
parent
c6319ff71c
commit
557b3f389c
8
edgware/utils/clean_cats.py
Normal file
8
edgware/utils/clean_cats.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from files.models import *
|
||||
|
||||
def do():
|
||||
for c in Category.objects.all():
|
||||
if c.file_set.count() == 0:
|
||||
print c.name
|
||||
c.delete()
|
||||
|
Loading…
Reference in New Issue
Block a user