mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	If a note is saved and the main name changed without changing the normalized form, update the main alias
This commit is contained in:
		@@ -109,6 +109,12 @@ class Note(PolymorphicModel):
 | 
			
		||||
            # Save alias
 | 
			
		||||
            a.note = self
 | 
			
		||||
            a.save(force_insert=True)
 | 
			
		||||
        else:
 | 
			
		||||
            # Check if the name of the note changed without changing the normalized form of the alias
 | 
			
		||||
            alias = Alias.objects.get(normalized_name=Alias.normalize(str(self)))
 | 
			
		||||
            if alias.name != str(self):
 | 
			
		||||
                alias.name = str(self)
 | 
			
		||||
                alias.save()
 | 
			
		||||
 | 
			
		||||
    def clean(self, *args, **kwargs):
 | 
			
		||||
        """
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user