Skip to content

Commit

Permalink
Profile manager migration fixes (#77)
Browse files Browse the repository at this point in the history
Profile maanager migration fixes
  • Loading branch information
johnyrahul authored Mar 10, 2024
1 parent 40e6148 commit 80d4870
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def MigrateProfileManager(apps: Any, schema_editor: Any) -> None:
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
)
Expand Down

0 comments on commit 80d4870

Please sign in to comment.