diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-15 15:15:21 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-15 15:15:21 +0300 |
commit | d2ca08edbef7e08afbeb18a1dd8e6cabe1f16a3f (patch) | |
tree | 1b79189369d7c079fd704c983f73cac9118e5ded /servo/models | |
parent | 2d5770393e55d3ba055fb10db54afe37bd28b590 (diff) | |
download | Servo-d2ca08edbef7e08afbeb18a1dd8e6cabe1f16a3f.tar.gz Servo-d2ca08edbef7e08afbeb18a1dd8e6cabe1f16a3f.tar.bz2 Servo-d2ca08edbef7e08afbeb18a1dd8e6cabe1f16a3f.zip |
Fix saving notes
Diffstat (limited to 'servo/models')
-rw-r--r-- | servo/models/common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servo/models/common.py b/servo/models/common.py index 69feea2..520b769 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -762,9 +762,9 @@ class Template(models.Model): class Attachment(models.Model): """A file attached to something.""" - - ref = models.CharField(max_length=32) - ref_id = models.IntegerField() + content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) + object_id = models.PositiveIntegerField() + content_object = GenericForeignKey('content_type', 'object_id') mime_type = models.CharField(max_length=64, editable=False) content = models.FileField( |