Fixes: 1) Corrected `DBBACKUP_PATH` default to ensure proper backup directory structure. Extra: 1) Minor cleanup in FTP storage configuration handling.
11 lines
302 B
Python
11 lines
302 B
Python
from urllib.parse import urlparse
|
|
|
|
from storages.backends.ftp import FTPStorage
|
|
|
|
|
|
class AbsoluteFTPStorage(FTPStorage): # type: ignore
|
|
def _get_config(self):
|
|
cfg = super()._get_config()
|
|
url = urlparse(self.location)
|
|
cfg["path"] = url.path or cfg["path"]
|
|
return cfg
|