change news tag command

This commit is contained in:
Dmitriy Kuzmenko 2019-11-04 11:49:57 +03:00
parent 623a90e6a7
commit 55c24c400b

View File

@ -15,7 +15,7 @@ class Command(BaseCommand):
news_type.tag_categories.add(tag_cat)
news_type.save()
old_news_tag = PageMetadata.objects.filter(key='category', page__isnull=False)
old_news_tag = PageMetadata.objects.filter(key='category', page__pagetexts__isnull=False)
for old_tag in old_news_tag:
old_id_list = old_tag.page.pagetexts_set.all().values_list('id', flat=True)