diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-02-09 13:24:27 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-02-09 13:24:27 +0200 |
commit | d4cb244ec9491e2a759566ff8eabc499dce4eea7 (patch) | |
tree | f467a869adc2d5c5d1990a60bc92bc115e0e6209 /servo | |
parent | a4152df12962cb1a49fcfbf40a65a1eb0537c5c4 (diff) | |
download | Servo-d4cb244ec9491e2a759566ff8eabc499dce4eea7.tar.gz Servo-d4cb244ec9491e2a759566ff8eabc499dce4eea7.tar.bz2 Servo-d4cb244ec9491e2a759566ff8eabc499dce4eea7.zip |
Cleanup
Diffstat (limited to 'servo')
-rw-r--r-- | servo/models/common.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/servo/models/common.py b/servo/models/common.py index eedba96..4ca1ff8 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -144,7 +144,7 @@ class Event(BaseItem): def save(self, *args, **kwargs): saved = super(Event, self).save(*args, **kwargs) - + if settings.ENABLE_RULES is True: from servo.tasks import apply_rules apply_rules.delay(self) @@ -773,7 +773,7 @@ class Attachment(BaseItem): if ext in DENIED_EXTENSIONS: raise ValueError(_(u'%s is not of an allowed file type') % filename) - super(Attachment, self).save(*args, **kwargs) + return super(Attachment, self).save(*args, **kwargs) def __unicode__(self): return os.path.basename(self.content.name) @@ -786,7 +786,6 @@ class Attachment(BaseItem): def get_absolute_url(self): return reverse("files-view_file", args=[self.pk]) - return "/files/%d/view" % self.pk class Meta: app_label = "servo" |