Created
December 30, 2013 20:07
-
-
Save qpfiffer/8187360 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [1]: [r.save_related() for r in Response.objects.filter(question__slug__in=['survey-site', 'vendor', 'buy-or-catch', 'how-sold'])] | |
| --------------------------------------------------------------------------- | |
| AttributeError Traceback (most recent call last) | |
| <ipython-input-1-68728f953d01> in <module>() | |
| ----> 1 [r.save_related() for r in Response.objects.filter(question__slug__in=['survey-site', 'vendor', 'buy-or-catch', 'how-sold'])] | |
| /vagrant/server/apps/survey/models.pyc in save_related(self) | |
| 538 .update(**{question_slug: self.answer})) | |
| 539 setattr(self.respondant, question_slug, self.answer) | |
| --> 540 self.respondant.update_csv_row() | |
| 541 self.save() | |
| 542 | |
| /vagrant/server/apps/survey/models.pyc in update_csv_row(self) | |
| 83 | |
| 84 def update_csv_row(self): | |
| ---> 85 self.csv_row.json_data = simplejson.dumps(self.generate_flat_dict()) | |
| 86 self.csv_row.save() | |
| 87 | |
| AttributeError: 'NoneType' object has no attribute 'json_data' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment