add backend support for fault_stamp and comment
This commit is contained in:
parent
da4c580c18
commit
9c92a6ecf3
@ -298,6 +298,8 @@ def add_coin(request, country, year, value):
|
|||||||
buy_only = False
|
buy_only = False
|
||||||
checked = False
|
checked = False
|
||||||
ec = False
|
ec = False
|
||||||
|
fault_stamp = False
|
||||||
|
comment = ''
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
@ -333,9 +335,11 @@ def add_coin(request, country, year, value):
|
|||||||
elif circulation > 1000000000:
|
elif circulation > 1000000000:
|
||||||
return response(1, f"Die Münzauflage '{circulation}' ist unrealistisch.")
|
return response(1, f"Die Münzauflage '{circulation}' ist unrealistisch.")
|
||||||
|
|
||||||
buy_only = True if request.POST.get('buy_only') == 'true' else False
|
buy_only = True if request.POST.get('buy_only') == 'true' else False
|
||||||
checked = True if request.POST.get('checked') == 'true' else False
|
checked = True if request.POST.get('checked') == 'true' else False
|
||||||
ec = True if request.POST.get('ec') == 'true' else False
|
ec = True if request.POST.get('ec') == 'true' else False
|
||||||
|
fault_stamp = True if request.POST.get('fault_stamp') == 'true' else False
|
||||||
|
comment = request.POST.get('comment', '')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
coin = Coin.objects.get(
|
coin = Coin.objects.get(
|
||||||
@ -352,6 +356,8 @@ def add_coin(request, country, year, value):
|
|||||||
coin.checked = checked
|
coin.checked = checked
|
||||||
coin.in_collector = ec
|
coin.in_collector = ec
|
||||||
coin.exists = exists
|
coin.exists = exists
|
||||||
|
coin.fault_stamp = fault_stamp
|
||||||
|
coin.comment = comment
|
||||||
coin.save(force_update=True)
|
coin.save(force_update=True)
|
||||||
|
|
||||||
except Coin.DoesNotExist:
|
except Coin.DoesNotExist:
|
||||||
@ -369,7 +375,9 @@ def add_coin(request, country, year, value):
|
|||||||
buy_only = buy_only,
|
buy_only = buy_only,
|
||||||
checked = checked,
|
checked = checked,
|
||||||
in_collector = ec,
|
in_collector = ec,
|
||||||
exists = exists)
|
exists = exists,
|
||||||
|
fault_stamp = fault_stamp,
|
||||||
|
comment = comment)
|
||||||
|
|
||||||
return response()
|
return response()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user