Make it possible to fully delete unlisted/unrated extensions #81

Merged
Anna Sirota merged 24 commits from fully-delete-extension into main 2024-04-19 11:00:19 +02:00
2 changed files with 19 additions and 1 deletions
Showing only changes of commit 051657aa5b - Show all commits

View File

@ -0,0 +1,18 @@
# Generated by Django 4.2.11 on 2024-04-18 10:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('files', '0006_remove_file_date_deleted'),
]
operations = [
migrations.AlterField(
model_name='file',
name='status',
field=models.PositiveSmallIntegerField(choices=[(2, 'Awaiting Review'), (3, 'Approved'), (4, 'Disabled by staff'), (5, 'Disabled by author')], default=2),
),
]

View File

@ -76,7 +76,7 @@ class File(CreatedModifiedMixin, TrackChangesMixin, models.Model):
'as guessed from its contents.' 'as guessed from its contents.'
), ),
) )
status = models.PositiveSmallIntegerField(choices=STATUSES, default=STATUSES.APPROVED) status = models.PositiveSmallIntegerField(choices=STATUSES, default=STATUSES.AWAITING_REVIEW)
user = models.ForeignKey( user = models.ForeignKey(
User, related_name='files', null=False, blank=False, on_delete=models.CASCADE User, related_name='files', null=False, blank=False, on_delete=models.CASCADE