diff options
author | Alban Gruin | 2018-01-27 19:11:45 +0100 |
---|---|---|
committer | Alban Gruin | 2018-01-27 19:11:45 +0100 |
commit | 0838f8a7ab0863c8e1cd277a4dd7de62ba61b5f4 (patch) | |
tree | cf94820d438896c7c377ce4efdf34d4bb35b4cc3 | |
parent | c9388e29b2f9ee18a9e190683a8a33fb710684c5 (diff) |
SlugModel.save() transfère tous les arguments reçus à Model.save()
-rw-r--r-- | models.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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",) |