mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-31 15:50:03 +01:00 
			
		
		
		
	When data is imported from the NK15, prevent users whenever some aliases are deleted
This commit is contained in:
		| @@ -222,7 +222,7 @@ class Alias(models.Model): | ||||
|     normalized_name = models.CharField( | ||||
|         max_length=255, | ||||
|         unique=True, | ||||
|         default='', | ||||
|         blank=False, | ||||
|         editable=False, | ||||
|     ) | ||||
|     note = models.ForeignKey( | ||||
| @@ -257,6 +257,8 @@ class Alias(models.Model): | ||||
|         if len(normalized_name) >= 255: | ||||
|             raise ValidationError(_('Alias is too long.'), | ||||
|                                   code='alias_too_long') | ||||
|         if not normalized_name: | ||||
|             raise ValidationError(_('This alias contains only complex character. Please use a more simple alias.')) | ||||
|         try: | ||||
|             sim_alias = Alias.objects.get(normalized_name=normalized_name) | ||||
|             if self != sim_alias: | ||||
|   | ||||
 Submodule apps/scripts updated: 81709539a2...4179cad611
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,2 +0,0 @@ | ||||
| {# The data is already sent as HTML, so we return only the HTML data. Devs don't need a pretty mail... #} | ||||
| {{ error }} | ||||
| @@ -1,7 +0,0 @@ | ||||
| Une erreur est survenue dans la Note Kfet. Les détails sont ci-dessous. | ||||
|  | ||||
| Cordialement, | ||||
|  | ||||
| L'équipe de la Note Kfet. | ||||
|  | ||||
| {{ error }} | ||||
		Reference in New Issue
	
	Block a user