Univention Bugzilla – Attachment 8061 Details for
Bug 42441
Traceback upon changing student's class assignment in UMC module "users (schools)"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patches from previous two comments
42441_fix_None_schools.patch (text/plain), 1.76 KB, created by
Daniel Tröder
on 2016-10-02 20:10:21 CEST
(
hide
)
Description:
patches from previous two comments
Filename:
MIME Type:
Creator:
Daniel Tröder
Created:
2016-10-02 20:10:21 CEST
Size:
1.76 KB
patch
obsolete
>Index: ucs-school-lib/python/models/attributes.py >=================================================================== >--- ucs-school-lib/python/models/attributes.py (Revision 72938) >+++ ucs-school-lib/python/models/attributes.py (Arbeitskopie) >@@ -184,6 +184,7 @@ > udm_name = None > > class SchoolClassesAttribute(Attribute): >+ udm_name = None > value_dict = True > > class SchoolClassAttribute(Attribute): >Index: ucs-school-lib/python/models/user.py >=================================================================== >--- ucs-school-lib/python/models/user.py (Revision 72938) >+++ ucs-school-lib/python/models/user.py (Arbeitskopie) >@@ -74,6 +74,11 @@ > super(User, self).__init__(*args, **kwargs) > if self.school_classes is None: > self.school_classes = {} >+ if self.schools is None: >+ if self.school: >+ self.schools = [self.school] >+ else: >+ self.schools = [] > > @classmethod > def shall_create_mail_domain(cls): >Index: ucs-school-umc-wizards/umc/python/schoolwizards/__init__.py >=================================================================== >--- ucs-school-umc-wizards/umc/python/schoolwizards/__init__.py (Revision 72938) >+++ ucs-school-umc-wizards/umc/python/schoolwizards/__init__.py (Arbeitskopie) >@@ -200,8 +200,13 @@ > if obj.errors: > ret.append({'result' : {'message' : obj.get_error_msg()}}) > continue >+ obj_loaded = obj.from_dn(obj.dn, obj.school, ldap_user_read) >+ for name, _attr in obj._attributes.iteritems(): >+ new_value = getattr(obj, name) >+ if new_value is not None: >+ setattr(obj_loaded, name, new_value) > try: >- obj.modify(ldap_user_write, validate=False) >+ obj_loaded.modify(ldap_user_write, validate=False) > except uldapBaseException as exc: > ret.append({'result' : {'message' : get_exception_msg(exc)}}) > else:
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 42441
: 8061 |
8077