mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 06:19:15 +02:00
Brand new file importer
This commit is contained in:
parent
2e616282fd
commit
1c8f055490
16 changed files with 302 additions and 15 deletions
|
@ -405,8 +405,11 @@ class ImportBatch(models.Model):
|
|||
@property
|
||||
def status(self):
|
||||
pending = any([job.status == 'pending' for job in self.jobs.all()])
|
||||
errored = any([job.status == 'errored' for job in self.jobs.all()])
|
||||
if pending:
|
||||
return 'pending'
|
||||
if errored:
|
||||
return 'errored'
|
||||
return 'finished'
|
||||
|
||||
class ImportJob(models.Model):
|
||||
|
@ -418,7 +421,7 @@ class ImportJob(models.Model):
|
|||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.CASCADE)
|
||||
source = models.URLField()
|
||||
source = models.CharField(max_length=500)
|
||||
mbid = models.UUIDField(editable=False, null=True, blank=True)
|
||||
STATUS_CHOICES = (
|
||||
('pending', 'Pending'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue