Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mediabackup not working with S3 storages #498

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mlutescu
Copy link

@mlutescu mlutescu commented Dec 3, 2023

Type of PR (feature, enhancement, bug fix, etc.)

Description

Please include a summary of the change and which issue is fixed.

Fixes # (issue)

Why should this be added

Explain value.

Checklist

  • Documentation has been added or amended for this feature / update

Copy link
Contributor

@Archmonger Archmonger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes needed. Will mark this PR as draft until changes are submitted.

dbbackup/VERSION Outdated Show resolved Hide resolved
dbbackup/management/commands/mediabackup.py Outdated Show resolved Hide resolved
@Archmonger Archmonger marked this pull request as draft January 29, 2024 22:37
from django.core.files.storage import storages
from django.db import DEFAULT_DB_ALIAS

return storages[DEFAULT_DB_ALIAS]
Copy link
Contributor

@Archmonger Archmonger Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm if this works when replacing with the following?

try:
    ...
except Exception:
    from django.core.files.storage import default_storage

    return default_storage()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants