be fe fixes
This commit is contained in:
@@ -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] = {
|
||||
|
||||
Reference in New Issue
Block a user