Fix widgets bundle and widget type alias creation.
This commit is contained in:
		
							parent
							
								
									2543063e4a
								
							
						
					
					
						commit
						2ce15d5f6f
					
				@ -124,8 +124,10 @@ public class WidgetTypeServiceImpl implements WidgetTypeService {
 | 
			
		||||
                    if (widgetsBundle == null) {
 | 
			
		||||
                        throw new DataValidationException("Widget type is referencing to non-existent widgets bundle!");
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    String alias = widgetType.getName().toLowerCase().replaceAll("\\W+", "_");
 | 
			
		||||
                    String alias = widgetType.getAlias();
 | 
			
		||||
                    if (alias == null || alias.trim().isEmpty()) {
 | 
			
		||||
                        alias = widgetType.getName().toLowerCase().replaceAll("\\W+", "_");
 | 
			
		||||
                    }
 | 
			
		||||
                    String originalAlias = alias;
 | 
			
		||||
                    int c = 1;
 | 
			
		||||
                    WidgetType withSameAlias;
 | 
			
		||||
 | 
			
		||||
@ -169,7 +169,10 @@ public class WidgetsBundleServiceImpl implements WidgetsBundleService {
 | 
			
		||||
 | 
			
		||||
                @Override
 | 
			
		||||
                protected void validateCreate(WidgetsBundle widgetsBundle) {
 | 
			
		||||
                    String alias = widgetsBundle.getTitle().toLowerCase().replaceAll("\\W+", "_");
 | 
			
		||||
                    String alias = widgetsBundle.getAlias();
 | 
			
		||||
                    if (alias == null || alias.trim().isEmpty()) {
 | 
			
		||||
                        alias = widgetsBundle.getTitle().toLowerCase().replaceAll("\\W+", "_");
 | 
			
		||||
                    }
 | 
			
		||||
                    String originalAlias = alias;
 | 
			
		||||
                    int c = 1;
 | 
			
		||||
                    WidgetsBundle withSameAlias;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user