Log what vending machine purchase was from
This commit is contained in:
parent
945b365278
commit
672023f539
|
@ -1242,6 +1242,8 @@ class ProtocoinViewSet(Base):
|
||||||
source_card = get_object_or_404(models.Card, card_number=pk)
|
source_card = get_object_or_404(models.Card, card_number=pk)
|
||||||
source_user = source_card.user
|
source_user = source_card.user
|
||||||
|
|
||||||
|
machine = request.data.get('machine', 'unknown')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
number = request.data['number']
|
number = request.data['number']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -1276,8 +1278,9 @@ class ProtocoinViewSet(Base):
|
||||||
|
|
||||||
source_delta = -amount
|
source_delta = -amount
|
||||||
|
|
||||||
memo = 'Protocoin - Purchase spent ₱ {} on vending machine item #{}'.format(
|
memo = 'Protocoin - Purchase spent ₱ {} on {} vending machine item #{}'.format(
|
||||||
amount,
|
amount,
|
||||||
|
machine,
|
||||||
number,
|
number,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user