Univention Bugzilla – Attachment 10179 Details for
Bug 40731
IStates.parse() and all inherited syntax classes are broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
40731.patch (text/plain), 909 bytes, created by
Florian Best
on 2019-09-11 11:47:38 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2019-09-11 11:47:38 CEST
Size:
909 bytes
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >index 37d31c1d46..7821861171 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py >@@ -3384,12 +3384,10 @@ class IStates(select): > > @classmethod > def parse(cls, text): >- if isinstance(text, basestring): >- return text >- for value, choice in cls.values: >- if text == value: >- return choice[0] >- return text >+ for value, (choice, label) in cls.values: >+ if text == value or text == choice: >+ return choice >+ raise univention.admin.uexceptions.valueInvalidSyntax(_('Invalid choice.')) > > @classmethod > def get_object_property_filter(cls, object_property, object_property_value):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 40731
: 10179 |
10181
|
10182