Bug 48649 - ValidationError: Context '54tg0eg3prw' is not supported for this object. Object is not in that school.
ValidationError: Context '54tg0eg3prw' is not supported for this object. Obje...
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v1
Assigned To: Daniel Tröder
Jürn Brodersen
:
Depends on:
Blocks: 48651
  Show dependency treegraph
 
Reported: 2019-02-11 22:00 CET by Sönke Schwardt-Krummrich
Modified: 2019-03-12 10:59 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2019-02-11 22:00:47 CET
http://jenkins.knut.univention.de:8080/job/UCSschool-4.4/job/Install%20Singleserver/lastCompletedBuild/Config=s4,TestGroup=import1/testReport/90_ucsschool/239_import-users_sisopi/test/

2019-02-11 16:09:47 INFO  pyhooks_loader.get_hook_classes:113  Found hook classes: 
2019-02-11 16:09:47 INFO  pyhooks_loader.get_hook_objects:146  Loaded hooks: {}.
2019-02-11 16:09:47 DEBUG base.call_hooks:405  /usr/share/ucs-school-import/hooks/user_modify_pre.d not found or empty.
2019-02-11 16:09:47 INFO  base.modify_without_hooks:524  Modifying ImportStaff(name='mo3qr6yb9a', school='pzvxd', dn='uid=mo3qr6yb9a,cn=mitarbeiter,cn=users,ou=pzvxd,dc=autotest201,dc=local')
2019-02-11 16:09:47 DEBUG base.get_udm_object:717  Getting School UDM object by dn: ou=pzvxd,dc=autotest201,dc=local
2019-02-11 16:09:47 DEBUG base.get_only_udm_obj:926  Getting ImportStaff UDM object by filter: &(!(uid=mo3qr6yb9a))(mailPrimaryAddress=mo3qr6yb9a@autotest201.local)
2019-02-11 16:09:47 DEBUG base.get_all:792  Getting all School of None with filter '(objectClass=ucsschoolOrganizationalUnit)'
2019-02-11 16:09:48 ERROR mass_import.import_users:117  {'ucsschool_roles': ["Context '54tg0eg3prw' is not supported for this object. Object is not in that school."]}
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/mass_import.py", line 109, in import_users
    user_import.delete_users(users_to_delete)  # 0% - 10%
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 409, in delete_users
    success = self.do_delete(user)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/sisopi_user_import.py", line 213, in do_delete
    success = user.modify(lo=self.connection)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 877, in modify
    res = super(ImportUser, self).modify(lo, validate, move_if_necessary)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 518, in modify
    success = self.modify_without_hooks(lo, validate, move_if_necessary)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 893, in modify_without_hooks
    return super(ImportUser, self).modify_without_hooks(lo, validate, move_if_necessary)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 532, in modify_without_hooks
    raise ValidationError(self.errors.copy())
ValidationError: {'ucsschool_roles': ["Context '54tg0eg3prw' is not supported for this object. Object is not in that school."]}


Please check why the validation fails in UCS@school 4.4.
Comment 1 Daniel Tröder univentionstaff 2019-02-12 14:47:32 CET
[4.4] 90319a226 Bug #48649: fix updating of ucsschool_roles attribute
[4.4] cc0cb90cd Bug #48649, Bug #48650, Bug #48651: changelog


ucs-school-lib (12.1.0-6)
ucs-school-import (17.0.4-3)
ucs-test-ucsschool (6.0.0-9)
Comment 2 Jürn Brodersen univentionstaff 2019-02-21 21:19:31 CET
Test are green -> OK
ucsschoolRole is changed if users school is changed through the import -> OK

-> Verified
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2019-03-12 10:59:09 CET
UCS@school 4.4 v1 has been released.

https://docs.software-univention.de/release-notes-ucsschool-4.4v1-de.html

If this error occurs again, please clone this bug.