mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 15:14:31 -04:00
fix: reverse_func functional
This commit is contained in:
parent
4581ea956f
commit
62f3d648d4
1 changed files with 5 additions and 4 deletions
|
@ -43,10 +43,11 @@ def reverse_func(apps, schema_editor):
|
|||
db_alias = schema_editor.connection.alias
|
||||
snapshots = SnapshotModel.objects.all()
|
||||
for snapshot in snapshots:
|
||||
for tag in tags:
|
||||
tagged_items = TaggedItemModel.objects.filter(
|
||||
object_id=snapshot.id,
|
||||
).delete()
|
||||
tags = TaggedItemModel.objects.filter(
|
||||
object_id=snapshot.id,
|
||||
)
|
||||
snapshot.tags_old = ",".join([tag.tag.name for tag in tags])
|
||||
snapshot.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue