Import of Contact Relationships fails with DuplicateRelationship error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
Fix Released
|
Critical
|
Alan Elkner |
Bug Description
I exported to xls, modified something, and tried to import. First, it failed on timetables (Bug #878209), I deleted that sheet and tried again. Now I got exception in Contact Relationships:
Traceback:
File "/home/
result = publication.
File "/home/
return mapply(ob, request.
File "/home/
return debug_call(obj, args)
Extra information: <schooltool.
File "/home/
return obj(*args)
File "/home/
self.update()
File "/home/
imp.import_
File "/home/
return self.process()
File "/home/
IContactable(
File "/home/
(other, self.other_role), extra_info)
File "/home/
raise DuplicateRelati
DuplicateRelati
This exception itself is not very informative, because it doesn't print person, contact, and relationship.
Maybe a row was in fact duplicated, then a human readable error should be displayed.
But what happens in this case is that without checking that such a relationship already exists, a new contact is being added.
So this not a user error, but a bug in the new contact import code (Bug #608873).
description: | updated |
Changed in schooltool: | |
status: | New → Fix Committed |
Changed in schooltool: | |
status: | Fix Committed → Fix Released |
Thank you very much!