Przeglądaj źródła

Fixes #11658: Remove reindex command call from search migration

jeremystretch 3 lat temu
rodzic
commit
e635e3e959
1 zmienionych plików z 0 dodań i 21 usunięć
  1. 0 21
      netbox/extras/migrations/0083_search.py

+ 0 - 21
netbox/extras/migrations/0083_search.py

@@ -1,27 +1,10 @@
-import sys
 import uuid
 
 import django.db.models.deletion
 import django.db.models.lookups
-from django.core import management
 from django.db import migrations, models
 
 
-def reindex(apps, schema_editor):
-    # Build the search index (except during tests)
-    if 'test' not in sys.argv:
-        management.call_command(
-            'reindex',
-            'circuits',
-            'dcim',
-            'extras',
-            'ipam',
-            'tenancy',
-            'virtualization',
-            'wireless',
-        )
-
-
 class Migration(migrations.Migration):
 
     dependencies = [
@@ -57,8 +40,4 @@ class Migration(migrations.Migration):
                 'ordering': ('weight', 'object_type', 'object_id'),
             },
         ),
-        migrations.RunPython(
-            code=reindex,
-            reverse_code=migrations.RunPython.noop
-        ),
     ]