mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	thumbor: Fix exceptions if LOCAL_UPLOADS_DIR is not set.
This is the typical configuration in /etc/zulip/settings.py for a site using S3, since there's no obligation to set the setting to None directly, and we're not importing the main `settings.py` (and thus not getting DEFAULT_SETTINGS applied).
This commit is contained in:
		@@ -19,7 +19,10 @@ config_file.read("/etc/zulip/zulip.conf")
 | 
			
		||||
# Whether this instance of Zulip is running in a production environment.
 | 
			
		||||
PRODUCTION = config_file.has_option('machine', 'deploy_type')
 | 
			
		||||
if PRODUCTION:
 | 
			
		||||
    try:
 | 
			
		||||
        from zproject.prod_settings import LOCAL_UPLOADS_DIR
 | 
			
		||||
    except ImportError:
 | 
			
		||||
        LOCAL_UPLOADS_DIR = None
 | 
			
		||||
else:
 | 
			
		||||
    from zproject.dev_settings import LOCAL_UPLOADS_DIR
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user