Univention Bugzilla – Attachment 9987 Details for
Bug 49311
KeyError: 'ucsschoolRole' in schoolrooms/computer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
49311.patch (text/plain), 931 bytes, created by
Christina Scheinig
on 2019-04-23 12:01:26 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Christina Scheinig
Created:
2019-04-23 12:01:26 CEST
Size:
931 bytes
patch
obsolete
>--- /usr/share/pyshared/ucsschool/lib/models/computer.py.bak 2019-04-08 09:34:45.004012314 +0200 >+++ /usr/share/pyshared/ucsschool/lib/models/computer.py 2019-04-08 09:52:39.279993670 +0200 >@@ -290,7 +290,14 @@ > @classmethod > def from_udm_obj(cls, udm_obj, school, lo): > from ucsschool.lib.models.school import School >- obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) >+ try: >+ obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) >+ except KeyError: >+# raise >+ import univention >+ x = univention.admin.modules.get(udm_obj.module) >+ univention.admin.modules.init(lo, univention.admin.uldap.getMachineConnection()[1], x) >+ obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) > obj.ip_address = udm_obj['ip'] > school_obj = School.cache(obj.school) > edukativnetz_group = school_obj.get_administrative_group_name('educational', domain_controller=False, as_dn=True)
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 49311
: 9987