コード例 #1
0
ファイル: tasks.py プロジェクト: kriberg/stationspinner
def character_asset_worth(characterID):
    try:
        character = CharacterSheet.objects.get(pk=characterID)
    except CharacterSheet.DoesNotExist:
        log.warning("Got signal for character_assets_parsed from non-existing characterID {0}".format(characterID))
        return

    net_worth = ChrAsset.objects.net_worth(character)

    worth = AssetWorthEntry(owner=character.pk, value=net_worth)
    worth.save()
コード例 #2
0
ファイル: tasks.py プロジェクト: kriberg/stationspinner
def corporation_asset_worth(corporationID):
    try:
        corporation = CorporationSheet.objects.get(pk=corporationID)
    except CorporationSheet.DoesNotExist:
        log.warning(
            "Got signal for corporation_assets_parsed from non-existing corporationID {0}".format(corporationID)
        )
        return

    net_worth = CorpAsset.objects.net_worth(corporation)

    worth = AssetWorthEntry(owner=corporation.pk, value=net_worth)
    worth.save()
コード例 #3
0
ファイル: tasks.py プロジェクト: kriberg/stationspinner
def corporation_asset_worth(corporationID):
    try:
        corporation = CorporationSheet.objects.get(pk=corporationID)
    except CorporationSheet.DoesNotExist:
        log.warning(
            'Got signal for corporation_assets_parsed from non-existing corporationID {0}'
            .format(corporationID))
        return

    net_worth = CorpAsset.objects.net_worth(corporation)

    worth = AssetWorthEntry(owner=corporation.pk, value=net_worth)
    worth.save()
コード例 #4
0
ファイル: tasks.py プロジェクト: kriberg/stationspinner
def character_asset_worth(characterID):
    try:
        character = CharacterSheet.objects.get(pk=characterID)
    except CharacterSheet.DoesNotExist:
        log.warning(
            'Got signal for character_assets_parsed from non-existing characterID {0}'
            .format(characterID))
        return

    net_worth = ChrAsset.objects.net_worth(character)

    worth = AssetWorthEntry(owner=character.pk, value=net_worth)
    worth.save()