From d4cb244ec9491e2a759566ff8eabc499dce4eea7 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 9 Feb 2016 13:24:27 +0200 Subject: Cleanup --- servo/models/common.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'servo') 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" -- cgit v1.2.3