mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Access to consumer object wa buggy
This commit is contained in:
		@@ -123,8 +123,10 @@ class ConsumerViewSet(ReadOnlyProtectedModelViewSet):
 | 
				
			|||||||
        queryset = queryset.order_by("name") \
 | 
					        queryset = queryset.order_by("name") \
 | 
				
			||||||
            if settings.DATABASES[queryset.db]["ENGINE"] == 'django.db.backends.postgresql' else queryset
 | 
					            if settings.DATABASES[queryset.db]["ENGINE"] == 'django.db.backends.postgresql' else queryset
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        alias = self.request.query_params.get("alias", ".*")
 | 
					        alias = self.request.query_params.get("alias", None)
 | 
				
			||||||
        queryset = queryset.prefetch_related('note')
 | 
					        queryset = queryset.prefetch_related('note')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if alias:
 | 
				
			||||||
            # We match first an alias if it is matched without normalization,
 | 
					            # We match first an alias if it is matched without normalization,
 | 
				
			||||||
            # then if the normalized pattern matches a normalized alias.
 | 
					            # then if the normalized pattern matches a normalized alias.
 | 
				
			||||||
            queryset = queryset.filter(
 | 
					            queryset = queryset.filter(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user