Commit 85f69ca
committed
Instead of using the validate_extra method for this, create a method named get_timezone_choices that
simply returns system_get_timezone_list(). Then use 'get_timezone_choices' as the choices_callable
parameter for the timezone field. This will automatically perform the choices validation and ensures
the package knows this field uses an enum for schema generation purposes.
Thanks to @jaredhendrickson131 parent d24e8d8 commit 85f69ca
File tree
1 file changed
+3
-11
lines changed- pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models
1 file changed
+3
-11
lines changedLines changed: 3 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 44 | + | |
| 45 | + | |
54 | 46 | | |
55 | 47 | | |
0 commit comments