Skip to content

Commit

Permalink
Correct new card fee type error
Browse files Browse the repository at this point in the history
  • Loading branch information
dougpenny committed Aug 20, 2024
1 parent 5b2022d commit 30b4d44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion profiles/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import decimal
import io
import logging
import operator
Expand Down Expand Up @@ -181,7 +182,7 @@ def new_individual_card(request, pk):
if "waive-fee" in request.POST:
cost = 0
else:
cost = SiteConfiguration.get_solo().new_card_fee
cost = decimal.Decimal(SiteConfiguration.get_solo().new_card_fee)
try:
profile = Profile.objects.get(id=pk)
transaction = Transaction(
Expand Down
12 changes: 6 additions & 6 deletions transactions/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def create_deposit(deposit: dict) -> Transaction:
)
transaction.save()
return transaction
except:
raise Exception
except Exception as e:
raise e


def create_order(order: dict) -> Transaction:
Expand Down Expand Up @@ -80,8 +80,8 @@ def create_order(order: dict) -> Transaction:
# Why would we recevie a transaction ID for an order that doesn't exist?
pass
return new_order
except:
raise Exception
except Exception as e:
raise e


def process_transaction(transaction: Transaction):
Expand All @@ -98,5 +98,5 @@ def process_transaction(transaction: Transaction):
transaction.save()
transactee.current_balance = transaction.ending_balance
transactee.save()
except:
raise Exception
except Exception as e:
raise e

0 comments on commit 30b4d44

Please sign in to comment.