add proxy model for SinglefileResult wrapping ArchiveResult

This commit is contained in:
Nick Sweeting 2024-09-10 00:05:37 -07:00
parent 04cb6bdfd6
commit 8d1d5df43a
No known key found for this signature in database
3 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# Generated by Django 5.1.1 on 2024-09-10 05:05
from django.db import migrations
class Migration(migrations.Migration):
initial = True
dependencies = [
('core', '0074_alter_snapshot_downloaded_at'),
]
operations = [
migrations.CreateModel(
name='SinglefileResult',
fields=[
],
options={
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('core.archiveresult',),
),
]

View file

@ -0,0 +1,14 @@
from django.db import models
from core.models import ArchiveResult
class SinglefileResultManager(models.Manager):
def get_queryset(self):
return super().get_queryset().filter(extractor='singlefile')
class SinglefileResult(ArchiveResult):
objects = SinglefileResultManager()
class Meta:
proxy = True