From 0ed5d94c401732561cb5f5530d2341caf9cee43f Mon Sep 17 00:00:00 2001 From: jagadeeswaran-zipstack Date: Mon, 13 Jan 2025 18:33:16 +0530 Subject: [PATCH] fixed sonar issues --- .../migrations/0002_added_version_in_llmw.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/adapter_processor_v2/migrations/0002_added_version_in_llmw.py b/backend/adapter_processor_v2/migrations/0002_added_version_in_llmw.py index 9dac086b2..63c0129ed 100644 --- a/backend/adapter_processor_v2/migrations/0002_added_version_in_llmw.py +++ b/backend/adapter_processor_v2/migrations/0002_added_version_in_llmw.py @@ -8,12 +8,12 @@ def migrate_adapter_data(apps, schema_editor): - AdapterInstance = apps.get_model("adapter_processor_v2", "AdapterInstance") + adapter_instance = apps.get_model("adapter_processor_v2", "AdapterInstance") old_adapter_id = "llmwhisperer|0a1647f0-f65f-410d-843b-3d979c78350e" new_adapter_id = "llmwhisperer|a5e6b8af-3e1f-4a80-b006-d017e8e67f93" - for adapter in AdapterInstance.objects.all(): + for adapter in adapter_instance.objects.all(): # Deserialize adapter_metadata_b if it exists encryption_secret: str = settings.ENCRYPTION_KEY @@ -44,14 +44,14 @@ def migrate_adapter_data(apps, schema_editor): def rollback_adapter_data(apps, schema_editor): - AdapterInstance = apps.get_model("adapter_processor_v2", "AdapterInstance") + adapter_instance = apps.get_model("adapter_processor_v2", "AdapterInstance") old_adapter_id = "llmwhisperer|0a1647f0-f65f-410d-843b-3d979c78350e" encryption_secret: str = settings.ENCRYPTION_KEY f: Fernet = Fernet(encryption_secret.encode("utf-8")) - for adapter in AdapterInstance.objects.all(): + for adapter in adapter_instance.objects.all(): if adapter.adapter_metadata_b: # Deserialize adapter_metadata_b metadata = json.loads(