Skip to content

Commit dd38f6d

Browse files
committed
Do not use list in Catalogs data migration
Signed-off-by: David Wallace <david.wallace@tu-darmstadt.de>
1 parent f79a7f1 commit dd38f6d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rdmo/questions/migrations/0098_data_migration_for_multisite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def set_sites_for_catalogs_without_sites(apps, schema_editor):
99
Catalog = apps.get_model('questions', 'Catalog')
1010
Site = apps.get_model('sites', 'Site')
1111

12-
all_sites = list(Site.objects.all())
13-
if not all_sites:
12+
all_sites = Site.objects.all()
13+
if not all_sites.exists():
1414
return
1515

1616
catalogs_without_sites = (

0 commit comments

Comments
 (0)