Skip to content

Conversation

ritaf-ORM
Copy link
Contributor

No description provided.

@Xronophobe
Copy link
Collaborator

Xronophobe commented Jul 31, 2024

Let's not merge this just yet! Some occurrences of form.errors are changed to just s.
I found line number 390 and 815 but I haven't checked thoroughly yet.

Copy link
Collaborator

@Xronophobe Xronophobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried adding these changes as suggestions we can just accept and commit, but I forgot how

@@ -387,7 +387,7 @@ from lists.forms import EMPTY_ITEM_ERROR, ItemForm
def test_form_validation_for_blank_items(self):
form = ItemForm(data={"text": ""})
self.assertFalse(form.is_valid())
self.assertEqual(form.errors["text"], [EMPTY_ITEM_ERROR])
self.assertEqual(s["text"], [EMPTY_ITEM_ERROR])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-        self.assertEqual(s["text"], [EMPTY_ITEM_ERROR])
+        self.assertEqual(form.errors["text"], [EMPTY_ITEM_ERROR])

Comment on lines -815 to +816
{% if form.errors %} <1>
<div class="invalid-feedback">{{ form.errors.text }}</div> <2>
{% if s %} <1>
<div class="invalid-feedback">{{ s.text }}</div> <2>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-    {% if s %}  <1>
-      <div class="invalid-feedback">{{ s.text }}</div>  <2>
+    {% if form.errors %}  <1>
+      <div class="invalid-feedback">{{ form.errors.text }}</div>  <2>

@Xronophobe Xronophobe merged commit 320ab11 into hjwp:main Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants