Explorar o código

clear all cache when lazy is not used #13544

Abhimanyu Saharan %!s(int64=2) %!d(string=hai) anos
pai
achega
88bf82be05
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      netbox/extras/management/commands/reindex.py

+ 1 - 4
netbox/extras/management/commands/reindex.py

@@ -69,10 +69,7 @@ class Command(BaseCommand):
         if not kwargs['lazy']:
             self.stdout.write('Clearing cached values... ', ending='')
             self.stdout.flush()
-            content_types = [
-                ContentType.objects.get_for_model(model) for model in indexers.keys()
-            ]
-            deleted_count = search_backend.clear(content_types)
+            deleted_count = search_backend.clear()
             self.stdout.write(f'{deleted_count} entries deleted.')
 
         # Index models