mirror of
https://github.com/Hopiu/django-tos.git
synced 2026-03-16 20:10:24 +00:00
Fixed bug in save() method of TermsOfService
This commit is contained in:
parent
5bad53b8bc
commit
2fe78d22d9
1 changed files with 3 additions and 3 deletions
|
|
@ -6,8 +6,8 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
class BaseModel(models.Model):
|
||||
|
||||
created = models.DateTimeField(auto_now_add=False, editable=False)
|
||||
modified = models.DateTimeField(auto_now=False, editable=False)
|
||||
created = models.DateTimeField(auto_now_add=True, editable=False)
|
||||
modified = models.DateTimeField(auto_now=True, editable=False)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
|
@ -31,7 +31,7 @@ class TermsOfService(BaseModel):
|
|||
def save(self, *args, **kwargs):
|
||||
""" Ensure we're being saved properly """
|
||||
|
||||
self.objects.exclude(id=self.id).update(active=False)
|
||||
TermsOfService.objects.exclude(id=self.id).update(active=False)
|
||||
|
||||
super(TermsOfService,self).save(*args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue