Skip to content

Commit

Permalink
Merge pull request #754 from Studio-Yandex-Practicum/bugfix/rename_hi…
Browse files Browse the repository at this point in the history
…story_links

Festival fix play links
  • Loading branch information
AntonZelinsky authored Feb 7, 2024
2 parents 02d08ea + 3157f66 commit 5725d88
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions apps/info/migrations/0031_fix_play_links.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.23 on 2024-02-03 22:10

from django.db import migrations
from django.db.models import Value
from django.db.models.functions import Replace


def fix_links(apps, schema_editor):
InfoLink = apps.get_model("info", "InfoLink")
InfoLink.objects.filter(link__icontains="lubimovka.art/library?").update(link=Replace("link", Value("festival="), Value("year=")))


class Migration(migrations.Migration):

dependencies = [
('info', '0030_alter_festival_year'),
]

operations = [
migrations.RunPython(fix_links, migrations.RunPython.noop),
]

0 comments on commit 5725d88

Please sign in to comment.