Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

Profile manager migration fixes (#77)

Rahul Johny80d487006143
diff --git a/backend/prompt_studio/prompt_profile_manager/migrations/0008_profilemanager_migration.py b/backend/prompt_studio/prompt_profile_manager/migrations/0008_profilemanager_migration.py
index c703139af..a00397d52 100644
--- a/backend/prompt_studio/prompt_profile_manager/migrations/0008_profilemanager_migration.py
+++ b/backend/prompt_studio/prompt_profile_manager/migrations/0008_profilemanager_migration.py
@@ -30,6 +30,10 @@ class Migration(migrations.Migration):
which has distinct profile manager."""
for index, custom_prompt in enumerate(custom_prompts):
+ """There can be scenario where individual prompts wont have a
+ profile manager attached."""
+ if not custom_prompt.profile_manager:
+ continue
profile_manager = ProfileManager.objects.get(
pk=custom_prompt.profile_manager.profile_id
)