From 820662cdf61f376d119aad20f14a295b185fefea Mon Sep 17 00:00:00 2001 From: gleb Date: Tue, 3 Sep 2024 16:29:05 +0200 Subject: [PATCH] Migrated categories from main site only --- migrator/services/migrate_projects.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/migrator/services/migrate_projects.py b/migrator/services/migrate_projects.py index e60ad755ed..51291f221b 100644 --- a/migrator/services/migrate_projects.py +++ b/migrator/services/migrate_projects.py @@ -283,6 +283,12 @@ def migrate_projects(site_ids: list[int] = None): # Migrate Categories for cat_obj in paginated_query("SELECT * FROM metac_question_category"): + category_site_id = int(cat_obj["id"].split("/")[0]) + + # Skip categories from other sites + if category_site_id not in site_ids: + continue + project = create_category(cat_obj) try: