Skip to content

Commit

Permalink
chore(topics): add migrate_good_to_promote_to_topic_pools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Nov 12, 2024
1 parent 94dee44 commit 129529b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/migrations/migrate_good_to_promote_to_topic_pools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import django
django.setup()
from sefaria.model import *
from admin_tools.models.topic_pool_link import PoolType, TopicPoolLink


def run():
ts = TopicSet({'good_to_promote': True})
for topic in ts:
link = TopicPoolLink(topic_slug=topic.slug, pool=PoolType.PROMOTED.value)
link.save()


if __name__ == "__main__":
run()

0 comments on commit 129529b

Please sign in to comment.