be fe fixes

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-26 10:43:51 +00:00
parent 4fe68cc271
commit 1cbc347cdc
15 changed files with 5557 additions and 149 deletions

View File

@@ -348,19 +348,19 @@ class IntegrationViewSet(SiteSectorModelViewSet):
# Build response with synced counts
post_types_data = {}
for wp_type, type_config in content_types.get('post_types', {}).items():
# Map WP type to entity_type
entity_type_map = {
# Map WP type to content_type
content_type_map = {
'post': 'post',
'page': 'page',
'product': 'product',
'service': 'service',
}
entity_type = entity_type_map.get(wp_type, 'post')
content_type = content_type_map.get(wp_type, 'post')
# Count synced content
synced_count = Content.objects.filter(
site=site,
entity_type=entity_type,
content_type=content_type,
external_type=wp_type,
sync_status__in=['imported', 'synced']
).count()
@@ -379,8 +379,7 @@ class IntegrationViewSet(SiteSectorModelViewSet):
# Count synced taxonomies
synced_count = ContentTaxonomy.objects.filter(
site=site,
external_taxonomy=wp_tax,
sync_status__in=['imported', 'synced']
external_taxonomy=wp_tax
).count()
taxonomies_data[wp_tax] = {