def add_allow_top_to_srs():
 from r2.models import Subreddit
 from r2.lib.db.operators import desc
 from r2.lib.utils import fetch_things2
 q = Subreddit._query((Subreddit.c._spam == (True, False)), sort=desc('_date'))
 for sr in fetch_things2(q):
  sr.allow_top = True
  sr._commit()

def add_allow_top_to_srs ( ) : from r2 . models import Subreddit from r2 . lib . db . operators import desc from r2 . lib . utils import fetch_things2 q = Subreddit . _query ( ( Subreddit . c . _spam == ( True , False ) ) , sort = desc ( '_date' ) ) for sr in fetch_things2 ( q ) : sr . allow_top = True sr . _commit ( )
add the allow_top property to all stored subreddits .