File: 0005-update-wtform-validator-call.patch

package info (click to toggle)
pagure 5.14.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,008 kB
  • sloc: python: 125,295; javascript: 22,012; makefile: 208; sh: 191
file content (28 lines) | stat: -rw-r--r-- 778 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix wtforms issue

The Required validator is no longer available. This will use
DataRequired instead of Required.

Author: zlopez, Michal Konečný
Forwarded: not-needed

--- a/pagure/forms.py
+++ b/pagure/forms.py
@@ -335,7 +335,7 @@ class RequestPullEditForm(RequestPullFor
 
     branch_to = wtforms.SelectField(
         "Target branch",
-        [wtforms.validators.Required()],
+        [wtforms.validators.DataRequired()],
         choices=[],
         coerce=convert_value,
     )
@@ -964,7 +964,7 @@ class TriggerCIPRForm(PagureForm):
         self.comment.choices = choices
 
     comment = wtforms.SelectField(
-        "comment", [wtforms.validators.Required()], choices=[]
+        "comment", [wtforms.validators.DataRequired()], choices=[]
     )