Example #1
0
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()
Example #2
0
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()
Example #3
0
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()
Example #4
0
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()