mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 15:49:16 +02:00
Fix #207: Consistent constraints/checks for URL size
This commit is contained in:
parent
86211dc515
commit
ae00cccf14
4 changed files with 67 additions and 38 deletions
|
@ -139,7 +139,7 @@ class Library(models.Model):
|
|||
on_delete=models.CASCADE,
|
||||
related_name='library')
|
||||
uuid = models.UUIDField(default=uuid.uuid4)
|
||||
url = models.URLField()
|
||||
url = models.URLField(max_length=500)
|
||||
|
||||
# use this flag to disable federation with a library
|
||||
federation_enabled = models.BooleanField()
|
||||
|
@ -166,8 +166,8 @@ def get_file_path(instance, filename):
|
|||
|
||||
|
||||
class LibraryTrack(models.Model):
|
||||
url = models.URLField(unique=True)
|
||||
audio_url = models.URLField()
|
||||
url = models.URLField(unique=True, max_length=500)
|
||||
audio_url = models.URLField(max_length=500)
|
||||
audio_mimetype = models.CharField(max_length=200)
|
||||
audio_file = models.FileField(
|
||||
upload_to=get_file_path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue