Skip to content

Commit

Permalink
variable re-init causing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pvyParts committed Nov 29, 2023
1 parent cc845fe commit 8b42a0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions taxtools/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ def send_invoices(self):

def rerun_taxes(self, record_id: int, alliance_filter=None):
record = CorpTaxRecord.objects.get(id=record_id)
data = json.loads(record.json_dump)
record_data = json.loads(record.json_dump)
# data['char_trans_ids']
# data['corp_trans_ids']
logger.debug("TAXTOOLS: Starting rerun_taxes")
Expand All @@ -1130,7 +1130,7 @@ def rerun_taxes(self, record_id: int, alliance_filter=None):
logger.debug("TAXTOOLS: Starting character_ratting_included")
for tax in self.character_ratting_included.all():
_taxes = tax.get_character_aggregates_corp_level_id(
data['char_trans_ids'], alliance_filter=alliance_filter)
record_data['char_trans_ids'], alliance_filter=alliance_filter)
output["char_tax"].append(_taxes)
for cid, data in _taxes.items():
if cid not in excluded_cids:
Expand All @@ -1151,7 +1151,7 @@ def rerun_taxes(self, record_id: int, alliance_filter=None):
logger.debug("TAXTOOLS: Starting character_taxes_included")
for tax in self.character_taxes_included.all():
_taxes = tax.get_character_aggregates_corp_level_id(
data['char_trans_ids'], alliance_filter=alliance_filter)
record_data['char_trans_ids'], alliance_filter=alliance_filter)
output["char_tax"].append(_taxes)
for cid, data in _taxes.items():
if cid not in excluded_cids:
Expand Down Expand Up @@ -1209,7 +1209,7 @@ def rerun_taxes(self, record_id: int, alliance_filter=None):
tax_invoices[cid]['messages'].append(
f"Industry Structures Tax: ${self.human_format(amount)} ({data['services_count']} Structure @ {self.human_format(tax.isk_per_service)} Per)")

logger.debug("TAXTOOLS: Done corporate_structure_tax_included")
logger.debug("TAXTOOLS: Done rerun_taxes")

return {"taxes": tax_invoices, "raw": output, "char_trans_ids": char_trans_ids, "corp_trans_ids": corp_trans_ids}

Expand Down

0 comments on commit 8b42a0f

Please sign in to comment.