Univention Bugzilla – Bug 37776
Whitespace in birthday is not shown as error
Last modified: 2015-02-27 15:19:43 CET
The CSV import module does not indicate some whitespaces in date strings as error. E.g. the birthdates "1991 -01-01", "1991-01 -01" and "1988. 4.21" are shown as valid date in the grid (no red highlighting) but are rejected by/cause errors during the import later on. Additionally the javascript date selector does not recognize the date and shows an empty field. This affects U@S 3.2R2 and U@S 4.0.
r57987 | Bug #37776: remove whitespace from birthday date strings ucs-school-umc-csv-import (2.0.3-2) unstable; urgency=low Changelog entry has been added
Die Ausführung des Kommandos schoolcsvimport/progress ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 316, in _response result = _multi_response(self, request) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 460, in _response return list(function(self, iterator, *nones)) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 282, in _fake_func yield function(self, *args) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/mixins.py", line 149, in progress ret = progress_obj.poll() File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 307, in _thread result = _multi_response(self, request) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 460, in _response return list(function(self, iterator, *nones)) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 282, in _fake_func yield function(self, *args) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolcsvimport/__init__.py", line 283, in show result['users'] = [user.to_dict(file_info.date_format) for user in users] File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolcsvimport/util.py", line 207, in to_dict attrs['birthday'] = format_date(attrs['birthday'].replace(' ', ''), format_birthday) AttributeError: 'NoneType' object has no attribute 'replace'
Created attachment 6705 [details] patch
I applied that patch.
Fix: OK Changelog: OK
(In reply to Florian Best from comment #4) > I applied that patch. Patch is ok. Btw: how did you trigger the traceback?
UCS@school 4.0 v2 has been released: http://docs.univention.de/release-notes-ucsschool-4.0v2-de.html If this error occurs again, please use "Clone This Bug".