Univention Bugzilla – Bug 49828
Python api for school computers doesn't support ip changes through list methods
Last modified: 2019-07-15 16:17:21 CEST
Python api for school computers doesn't support ip changes through list methods The python school lib doesn't support editing ip address by using list methods, like append and pop, and the ip_address attribute. Just using the methods works but the modify method ignores the changes. The problem seems to be a pointer to the ip attribute of the underlying udm object. "obj.ip_address = udm_obj['ip']" I think this might be done for the "nextIP magic" in "def _alter_udm_obj"? modify_without_hooks (in base.py) later uses the "info" attribute from the underlying udm object to detect changes: "old_attrs = deepcopy(udm_obj.info)". But due to the pointer, that is already in the same state as the school computer object. I 'm not sure why "info" and not "oldinfo" was used here?