def recalculate_accounts_might(): for account_model in AccountPrototype.live_query(): account = AccountPrototype(model=account_model) new_might = calculate_might(account) if account.might != new_might: account.set_might(new_might) account.cmd_update_hero() recalculate_folclor_rating()