mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 01:12:08 +01:00 
			
		
		
		
	Forgot to create the aliases for BDE and Kfet in the migration that create the clubs
This commit is contained in:
		@@ -7,6 +7,7 @@ def create_bde_and_kfet(apps, schema_editor):
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    Club = apps.get_model("member", "club")
 | 
					    Club = apps.get_model("member", "club")
 | 
				
			||||||
    NoteClub = apps.get_model("note", "noteclub")
 | 
					    NoteClub = apps.get_model("note", "noteclub")
 | 
				
			||||||
 | 
					    Alias = apps.get_model("note", "alias")
 | 
				
			||||||
    ContentType = apps.get_model('contenttypes', 'ContentType')
 | 
					    ContentType = apps.get_model('contenttypes', 'ContentType')
 | 
				
			||||||
    polymorphic_ctype_id = ContentType.objects.get_for_model(NoteClub).id
 | 
					    polymorphic_ctype_id = ContentType.objects.get_for_model(NoteClub).id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -45,6 +46,19 @@ def create_bde_and_kfet(apps, schema_editor):
 | 
				
			|||||||
        polymorphic_ctype_id=polymorphic_ctype_id,
 | 
					        polymorphic_ctype_id=polymorphic_ctype_id,
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Alias.objects.get_or_create(
 | 
				
			||||||
 | 
					        id=5,
 | 
				
			||||||
 | 
					        note_id=5,
 | 
				
			||||||
 | 
					        name="BDE",
 | 
				
			||||||
 | 
					        normalized_name="bde",
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    Alias.objects.get_or_create(
 | 
				
			||||||
 | 
					        id=6,
 | 
				
			||||||
 | 
					        note_id=6,
 | 
				
			||||||
 | 
					        name="Kfet",
 | 
				
			||||||
 | 
					        normalized_name="kfet",
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Migration(migrations.Migration):
 | 
					class Migration(migrations.Migration):
 | 
				
			||||||
    dependencies = [
 | 
					    dependencies = [
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user