[WEB-5044] fix: ruff lint and format errors (#7868)
* fix: lint errors * fix: file formatting * fix: code refactor
This commit is contained in:
parent
1fb22bd252
commit
9237f568dd
261 changed files with 2199 additions and 6378 deletions
|
|
@ -17,9 +17,6 @@ from plane.db.models import FileAsset
|
|||
def delete_unuploaded_file_asset():
|
||||
"""This task deletes unuploaded file assets older than a certain number of days."""
|
||||
FileAsset.objects.filter(
|
||||
Q(
|
||||
created_at__lt=timezone.now()
|
||||
- timedelta(days=int(os.environ.get("UNUPLOADED_ASSET_DELETE_DAYS", "7")))
|
||||
)
|
||||
Q(created_at__lt=timezone.now() - timedelta(days=int(os.environ.get("UNUPLOADED_ASSET_DELETE_DAYS", "7"))))
|
||||
& Q(is_uploaded=False)
|
||||
).delete()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue