Univention Bugzilla – Bug 51190
The import crashes if the name of a class contains a backslash
Last modified: 2020-06-10 14:36:40 CEST
+++ This bug was initially created as a clone of Bug #45683 +++ This change doesn't make sense to me: --------------------------------------------------------------- diff --git a/ucs-school-lib/python/models/user.py b/ucs-school-lib/python/models/user.py index 8b5fffbfd943e27c86029b94882d4fc8a66a7ea9..174b0c64ce75b2b3f7cc42ba5c7f9ed870a46ab8 100644 --- a/ucs-school-lib/python/models/user.py +++ b/ucs-school-lib/python/models/user.py @@ -424,7 +424,7 @@ class User(RoleSupportMixin, UCSSchoolHelperAbstractClass): try: syntax.gid.parse(class_name) except valueError as exc: - self.add_error('school_classes', str(exc)) + self.add_error('school_classes', _('{}'.format(exc))) def remove_from_school(self, school, lo): if not self.exists(lo): --------------------------------------------------------------- 1. There can be no translation for arbitrary strings (unknown error message). 2. We don't translate error messages for log files, only for UMC-Exceptions. Please revert the code or explain its intentions.
Arg! This commit (6338822a3452153add08e168def947de6c233fc0) did break the import! it removed the Python import of "string"!
Issue resolved with commit commit 661b733fa3bd61019b40cb619966cd72576e6507 Bug #51190: added import string on branch 4.4 Successful build: Package: ucs-school-import Version: 17.0.34A~4.4.0.202004301134 Branch: ucs_4.4-0 Scope: ucs-school-4.4 Sorry, this will not happen again.
No problem. Please also apply the changes in the Bug description.
Issue in Bug description resolved with commit baf3941df2f8b19c3ca97cfa5fde9ee589fc7596 Bug #51190: added yaml commit cd3ab6d3da23bb5c8153f3b24473ebc852d00ebb Bug #51190: added changelog entry commit e42348c10462edddcf35b4df12d6e15d347e85b5 Bug #51190: revert minor changes on branch 4.4. Successful build: Package: ucs-school-lib Version: 12.1.13A~4.4.0.202004301222 Branch: ucs_4.4-0 Scope: ucs-school-4.4
Thanks for the adjustments! Code -> ok Changelog -> ok Yaml -> ok
UCS@school 4.4 v5 has been released (errata update to the release). https://docs.software-univention.de/changelog-ucsschool-4.4v5-de.html If this error occurs again, please clone this bug.