mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 06:22:13 +01:00 
			
		
		
		
	Scholarships are not unique
This commit is contained in:
		@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
 | 
				
			|||||||
            fields=[
 | 
					            fields=[
 | 
				
			||||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
					                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
				
			||||||
                ('type', models.CharField(blank=True, choices=[('', 'No payment'), ('helloasso', 'Hello Asso'), ('scholarship', 'Scholarship'), ('bank_transfer', 'Bank transfer'), ('free', 'The tournament is free')], default='', max_length=16, verbose_name='type')),
 | 
					                ('type', models.CharField(blank=True, choices=[('', 'No payment'), ('helloasso', 'Hello Asso'), ('scholarship', 'Scholarship'), ('bank_transfer', 'Bank transfer'), ('free', 'The tournament is free')], default='', max_length=16, verbose_name='type')),
 | 
				
			||||||
                ('scholarship_file', models.FileField(blank=True, default='', help_text='only if you have a scholarship.', unique=True, upload_to=registration.models.get_scholarship_filename, verbose_name='scholarship file')),
 | 
					                ('scholarship_file', models.FileField(blank=True, default='', help_text='only if you have a scholarship.', upload_to=registration.models.get_scholarship_filename, verbose_name='scholarship file')),
 | 
				
			||||||
                ('additional_information', models.TextField(blank=True, default='', help_text='To help us to find your payment.', verbose_name='additional information')),
 | 
					                ('additional_information', models.TextField(blank=True, default='', help_text='To help us to find your payment.', verbose_name='additional information')),
 | 
				
			||||||
                ('valid', models.BooleanField(default=False, null=True, verbose_name='valid')),
 | 
					                ('valid', models.BooleanField(default=False, null=True, verbose_name='valid')),
 | 
				
			||||||
                ('registration', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='registration', to='registration.ParticipantRegistration', verbose_name='registration')),
 | 
					                ('registration', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='registration', to='registration.ParticipantRegistration', verbose_name='registration')),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -320,7 +320,6 @@ class Payment(models.Model):
 | 
				
			|||||||
        verbose_name=_("scholarship file"),
 | 
					        verbose_name=_("scholarship file"),
 | 
				
			||||||
        help_text=_("only if you have a scholarship."),
 | 
					        help_text=_("only if you have a scholarship."),
 | 
				
			||||||
        upload_to=get_scholarship_filename,
 | 
					        upload_to=get_scholarship_filename,
 | 
				
			||||||
        unique=True,
 | 
					 | 
				
			||||||
        blank=True,
 | 
					        blank=True,
 | 
				
			||||||
        default="",
 | 
					        default="",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user