mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-03 18:53:17 -05:00 
			
		
		
		
	fix: added validation to POSTGRES_URL_OVERRIDE
This commit is contained in:
		@@ -46,7 +46,11 @@ class PostgresProvider(AbstractDBProvider, BaseSettings):
 | 
			
		||||
    @property
 | 
			
		||||
    def db_url(self) -> str:
 | 
			
		||||
        if self.POSTGRES_URL_OVERRIDE:
 | 
			
		||||
            return self.POSTGRES_URL_OVERRIDE
 | 
			
		||||
            url = PostgresDsn(url=self.POSTGRES_URL_OVERRIDE)
 | 
			
		||||
            if not url.scheme == ("postgresql"):
 | 
			
		||||
                raise ValueError("POSTGRES_URL_OVERRIDE scheme must be postgresql")
 | 
			
		||||
 | 
			
		||||
            return str(url)
 | 
			
		||||
 | 
			
		||||
        return str(
 | 
			
		||||
            PostgresDsn.build(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user