Example #1
0
def migrate_some_cards():
    cur = mongo.Magic.cards.find()
    for oldCard in cur:
        oldInfo = cardinfo.get_by_id(oldCard["cardInfoId"])
        oldCard['name'] = oldInfo['name']
        if unicode(oldInfo['name']).lower() not in ["swamp","island","mountain","plains","forest"]:
            card = mongo.CardDocument()
            cards_old2new(oldCard,card)
Example #2
0
 def get_card_info(self):
     if not self._info:
         self._info = cardinfo.get_by_id(self.get_card_info_id())
     return self._info