Skip to content

🐛 Fixed an error when deleting a file if file output to the file system is disabled and the user does not have write permission to the file system. #1

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

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

eru
Copy link
Member

@eru eru commented Aug 10, 2023

DatabaseStorage.deleteの呼び出し時に、ファイルシステム上にキャッシュがある場合に削除を行う処理があり、その処理で呼び出されるget_hash_fn関数内で、ファイルシステム上にキャッシュファイルの保存先ディレクトリが存在しなければ作成するという処理があり、その部分でread-onlyであったり書き込み権限がない場合にエラーとなっていた。

https://github.com/CreditEngine/django-binary-database-files/blob/96a7457bb8678c66758afa05c61b1f178cba0399/binary_database_files/utils.py#L36C5-L48

該当関数でディレクトリを作成しないようにする対応方法もあったが、そもそもファイルシステム上にキャッシュを行う設定がoffの場合には、そのキャッシュの削除処理を行わないようにすることで対処。

https://creditengine.slack.com/archives/C0127M395NV/p1691633013314179

…em is disabled and the user does not have write permission to the file system.
@eru eru self-assigned this Aug 10, 2023
@eru eru requested review from alchen and thomas0chow August 10, 2023 05:19
Copy link

@alchen alchen left a comment

Choose a reason for hiding this comment

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

iine

@alchen alchen merged commit 3f237d8 into release Aug 10, 2023
@alchen alchen deleted the feature/fix-disable-export-db-to-fs branch August 10, 2023 05:30
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.

2 participants