Renamed the "eid" field to "id" in the LineItemForm form, since the problem is found. It was the "id" property of the enclosing FormField. If we extract the form from FormField, we can still access the "id" field.

This commit is contained in:
2023-03-20 23:06:57 +08:00
parent d4fe91ec4a
commit 079dc1ab6d
8 changed files with 30 additions and 39 deletions

View File

@ -369,7 +369,7 @@ class OffsetTestCase(unittest.TestCase):
# Not deleting matched original line items
form = journal_entry_data.update_form(self.csrf_token)
del form["currency-1-debit-1-eid"]
del form["currency-1-debit-1-id"]
response = self.client.post(update_uri, data=form)
self.assertEqual(response.status_code, 302)
self.assertEqual(response.headers["Location"], edit_uri)
@ -697,7 +697,7 @@ class OffsetTestCase(unittest.TestCase):
# Not deleting matched original line items
form = journal_entry_data.update_form(self.csrf_token)
del form["currency-1-credit-1-eid"]
del form["currency-1-credit-1-id"]
response = self.client.post(update_uri, data=form)
self.assertEqual(response.status_code, 302)
self.assertEqual(response.headers["Location"], edit_uri)