mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-03 01:15:57 +10:00
Fix: Increase Snapshot URL max_length from 200 to 1600 characters
- Updated Snapshot.url field in archivebox/core/models.py to max_length=1600 - Created migration 0025_alter_snapshot_url_max_length.py - Fixes issue where URLs longer than 200 characters could not be saved in Admin UI Fixes #1688 Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
# Generated by hand on 2025-12-29
|
||||||
|
# Increases Snapshot.url max_length from 200 to 1600 characters
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0024_assign_default_crawl'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='snapshot',
|
||||||
|
name='url',
|
||||||
|
field=models.URLField(max_length=1600, db_index=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -281,7 +281,7 @@ class Snapshot(ModelWithOutputDir, ModelWithConfig, ModelWithNotes, ModelWithHea
|
|||||||
created_at = models.DateTimeField(default=timezone.now, db_index=True)
|
created_at = models.DateTimeField(default=timezone.now, db_index=True)
|
||||||
modified_at = models.DateTimeField(auto_now=True)
|
modified_at = models.DateTimeField(auto_now=True)
|
||||||
|
|
||||||
url = models.URLField(unique=False, db_index=True) # URLs can appear in multiple crawls
|
url = models.URLField(max_length=1600, unique=False, db_index=True) # URLs can appear in multiple crawls
|
||||||
timestamp = models.CharField(max_length=32, unique=True, db_index=True, editable=False)
|
timestamp = models.CharField(max_length=32, unique=True, db_index=True, editable=False)
|
||||||
bookmarked_at = models.DateTimeField(default=timezone.now, db_index=True)
|
bookmarked_at = models.DateTimeField(default=timezone.now, db_index=True)
|
||||||
crawl: Crawl = models.ForeignKey(Crawl, on_delete=models.CASCADE, null=False, related_name='snapshot_set', db_index=True) # type: ignore[assignment]
|
crawl: Crawl = models.ForeignKey(Crawl, on_delete=models.CASCADE, null=False, related_name='snapshot_set', db_index=True) # type: ignore[assignment]
|
||||||
|
|||||||
Reference in New Issue
Block a user