Need to reset app view functions to prevent Flask assertion error on resetting view functions.
This commit is contained in:
		
							parent
							
								
									dd3cfe5ab6
								
							
						
					
					
						commit
						87c86bb902
					
				@ -26,6 +26,8 @@ class RegexConverter(BaseConverter):
 | 
			
		||||
def configure_urls(service):
 | 
			
		||||
    backend = globals()["{}_backend".format(service)]
 | 
			
		||||
    from werkzeug.routing import Map
 | 
			
		||||
    # Reset view functions to reset the app
 | 
			
		||||
    app.view_functions = {}
 | 
			
		||||
    app.url_map = Map()
 | 
			
		||||
    app.url_map.converters['regex'] = RegexConverter
 | 
			
		||||
    for url_path, handler in backend.flask_paths.iteritems():
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user