]> git.ipfire.org Git - thirdparty/patchwork.git/commit
models: Pull common email behavior into mixin
authorStephen Finucane <stephen.finucane@intel.com>
Thu, 15 Oct 2015 23:32:01 +0000 (00:32 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Wed, 16 Mar 2016 09:38:00 +0000 (09:38 +0000)
commit070083154c3cebb0f44e52fe742b00e68442ef22
tree6322f1889a7644b2c5ead3e358ffa42a6855f0d7
parentef56359fb7762126edac213d36727f4e0655f9f8
models: Pull common email behavior into mixin

A "Patch" and "Comment" share a common ancestor: emails. As a result
of this many fields are similar between the two. Rather than
duplicating code, pull the similar code out of the aforementioned
classes and into a Mixin.

This has the side effect of removing restrictions on Comment.content,
but this is probably OK: it's possible that someone could send an
empty mail in reply to a patch and we should show that.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
patchwork/migrations/0008_add_email_mixin.py [new file with mode: 0644]
patchwork/models.py