summaryrefslogtreecommitdiffstats
path: root/manage.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-06-05 14:33:13 +0800
committerJeremy Kerr <jk@ozlabs.org>2015-06-05 14:37:48 +0800
commit41d5ceb82b5d4297570b73639517b642fab0c45f (patch)
tree87af4cff500d1dcd39be8d3678ec8a81f0fefd35 /manage.py
parent30bb271ca25b9652744c3c17d9bc35cde91c6dc3 (diff)
downloadpatchwork-41d5ceb82b5d4297570b73639517b642fab0c45f.tar.bz2
patchwork-41d5ceb82b5d4297570b73639517b642fab0c45f.tar.xz
patchwork/parser: Adapt for new unsaved-foreign-key behaviour in django 1.8
Django 1.8 no longer supports assignment of unsaved models to ForeignKey fields: File "/home/jk/devel/patchwork/patchwork/tests/test_patchparser.py", line 75, in setUp (self.patch, self.comment) = find_content(self.project, email) File "/home/jk/devel/patchwork/patchwork/bin/parsemail.py", line 231, in find_content headers = mail_headers(mail)) File "/home/jk/devel/patchwork/lib/python/django/db/models/base.py", line 468, in __init__ setattr(self, field.name, rel_obj) File "/home/jk/devel/patchwork/lib/python/django/db/models/fields/related.py", line 668, in __set__ (value, self.field.rel.to._meta.object_name) ValueError: Cannot assign "<Patch: Test Subject>": "Patch" instance isn't saved in the database. Even though we'd be guaranteed to save the patch before the comment, we need to avoid this error. This change defers the assigment of Comment.patch until we know we have a saved Patch instance. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'manage.py')
0 files changed, 0 insertions, 0 deletions