My favorites | Sign in
Project Home Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 257: Emergency Contacts won't import
1 person starred this issue and may be notified of changes. Back to list
 
Project Member Reported by ca...@burkesoftware.com, Dec 11, 2011
When importing, errors out with:
<type 'exceptions.AttributeError'>'EmergencyContact' object has no attribute 'emergency_contacts'

in sis/importer.py
model is defined on 1308 as a student.
model.emergency_contacts is on lines 1434 and 1469


At first glance, it looks right. I'm too tired to look more into it right now.
Dec 11, 2011
Project Member #1 dmbs...@gmail.com
Just an indentation mistake, misaligned comment made it obvious.

If model was None, the code in question would still run and indeed model.emergency_contacts is not an attribute. 

I just removed the if model: thing It *should* raise an exception if model can't save for some reason. Please verify with your import.
Status: Needs_Verified
Owner: ca...@burkesoftware.com
Cc: da...@burkesoftware.com
Dec 11, 2011
Project Member #2 da...@burkesoftware.com
This issue was closed by revision d6c2a7bb7c0b.
Status: Fixed
Dec 12, 2011
Project Member #3 ca...@burkesoftware.com
Same error. I'll look at it today.
Status: Started
Dec 12, 2011
Project Member #4 ca...@burkesoftware.com
error is actually happening in sis/models.py, line 556. def after_student_m2m.
The instance is an emergency contact, not a student. Looking into it more.

Commenting out the line on 569 in sis/models.py imports without a problem. Not sure where 'instance' in this def is coming from.
Owner: da...@burkesoftware.com
Cc: -da...@burkesoftware.com ca...@burkesoftware.com
Dec 12, 2011
Project Member #5 da...@burkesoftware.com
This issue was closed by revision b4f15b513813.
Status: Fixed

Powered by Google Project Hosting