Skip to content
Snippets Groups Projects
Verified Commit aaee254d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix syntax of db backup options

parent 5b450159
No related branches found
No related tags found
1 merge request!343Fix backup options
Pipeline #3321 failed
......@@ -19,19 +19,11 @@ def send_notification(notification: int, resend: bool = False) -> None:
def backup_data() -> None:
"""Backup database and media using django-dbbackup."""
# Assemble command-line options for dbbackup management command
db_options = (
["-z"]
if settings.DBBACKUP_COMPRESS_DB
else [] + ["-e"]
if settings.DBBACKUP_ENCRYPT_DB
else []
db_options = (["-z"] if settings.DBBACKUP_COMPRESS_DB else []) + (
["-e"] if settings.DBBACKUP_ENCRYPT_DB else []
)
media_options = (
["-z"]
if settings.DBBACKUP_COMPRESS_MEDIA
else [] + "-e"
if settings.DBBACKUP_ENCRYPT_MEDIA
else []
media_options = (["-z"] if settings.DBBACKUP_COMPRESS_MEDIA else []) + (
["-e"] if settings.DBBACKUP_ENCRYPT_MEDIA else []
)
# Hand off to dbbackup's management commands
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment