Error importing mock data: "This field may not be blank" (person.ldap_fields.cn)
When importing mock data:
Traceback (most recent call last):
File "/works/nm.d.o/nm.debian.org/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/works/nm.d.o/nm.debian.org/backend/management/commands/import.py", line 28, in handle
loaded = load_db(json.load(fd))
^^^^^^^^^^^^^^^^^^^^^^
File "/works/nm.d.o/nm.debian.org/backend/export.py", line 100, in load_db
importer.import_all(data)
File "/works/nm.d.o/nm.debian.org/backend/export.py", line 473, in import_all
self.import_person(person, shallow=True)
File "/works/nm.d.o/nm.debian.org/backend/export.py", line 139, in import_person
raise RuntimeError("Invalid Person record {}: {}".format(data, s.errors))
RuntimeError: Invalid Person record {'is_staff': False, 'is_superuser': False, \
'ldap_fields': {'person': 'nicoo', 'cn': '', 'mn': '', 'sn': 'Nicoo', 'uid': 'nicoo', 'email': 'person-private@example.org'}
(... omitted): {'ldap_fields': {'cn': [ErrorDetail(string='This field may not be blank.', code='blank')]}}
It worked with last import, exactly a month ago (1 July). The data hasn't changed. Actually, the relevant part in backend/export.py and dsa/serializers.py haven't changed either.