aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2018-01-27 19:11:45 +0100
committerAlban Gruin2018-01-27 19:11:45 +0100
commit0838f8a7ab0863c8e1cd277a4dd7de62ba61b5f4 (patch)
treecf94820d438896c7c377ce4efdf34d4bb35b4cc3 /models.py
parentc9388e29b2f9ee18a9e190683a8a33fb710684c5 (diff)
SlugModel.save() transfère tous les arguments reçus à Model.save()
Diffstat (limited to 'models.py')
-rw-r--r--models.py6
1 files 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",)