From 0838f8a7ab0863c8e1cd277a4dd7de62ba61b5f4 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 27 Jan 2018 19:11:45 +0100 Subject: SlugModel.save() transfère tous les arguments reçus à Model.save() --- models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models.py b/models.py index 60be95c..9f36a6f 100644 --- a/models.py +++ b/models.py @@ -25,11 +25,11 @@ from .utils import parse_group class SlugModel(models.Model): - def save(self): + def save(self, *args, **kwargs): if not self.slug: self.slug = slugify(self.name) - super(SlugModel, self).save() + super(SlugModel, self).save(*args, **kwargs) class Meta: abstract = True @@ -148,7 +148,7 @@ class Group(SlugModel): if self.subgroup is None: self.subgroup = "" - super(Group, self).save() + super(Group, self).save(*args, **kwargs) class Meta: index_together = ("mention", "semester", "subgroup",) -- cgit v1.2.1