summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingtong Li <runassudo@yingtongli.me>2020-02-12 23:32:49 +1100
committerYingtong Li <runassudo@yingtongli.me>2020-02-13 22:36:52 +1100
commitdbe1eb988c7c61e4b481e29e435f11549429f345 (patch)
treeba2108907f482b818db53667ca6f4a18fa479149
parentf091b20773276493652f51eae291f94ccd6c88f3 (diff)
Actually preserve claim state when editing
-rw-r--r--sstreasury/views.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/sstreasury/views.py b/sstreasury/views.py
index 65d0e0a..63677bc 100644
--- a/sstreasury/views.py
+++ b/sstreasury/views.py
@@ -171,7 +171,6 @@ def claim_from_form(claim, form, files):
claim.budget_id = form['budget_id']
claim.comments = form['comments']
- claim.state = models.ClaimState.DRAFT.value
claim.items = json.loads(form['items'])
claim.payee_name = form['payee_name']
@@ -554,9 +553,7 @@ def claim_edit(request, claim):
return redirect(reverse('claim_list'))
with transaction.atomic():
- state = claim.state
claim = claim_from_form(claim, request.POST, request.FILES)
- claim.state = state
claim_history = models.ClaimHistory()
claim_history.claim = claim
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.