mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-17 20:01:44 +02:00
fix: reverse_func functional
This commit is contained in:
@@ -43,10 +43,11 @@ def reverse_func(apps, schema_editor):
|
|||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
snapshots = SnapshotModel.objects.all()
|
snapshots = SnapshotModel.objects.all()
|
||||||
for snapshot in snapshots:
|
for snapshot in snapshots:
|
||||||
for tag in tags:
|
tags = TaggedItemModel.objects.filter(
|
||||||
tagged_items = TaggedItemModel.objects.filter(
|
|
||||||
object_id=snapshot.id,
|
object_id=snapshot.id,
|
||||||
).delete()
|
)
|
||||||
|
snapshot.tags_old = ",".join([tag.tag.name for tag in tags])
|
||||||
|
snapshot.save()
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
Reference in New Issue
Block a user