1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-07 15:58:31 +02:00

Don't display a note that we can't see, fix CI, fix distinct fields on PostgresSQL DB

This commit is contained in:
Yohann D'ANELLO
2020-04-10 00:02:22 +02:00
parent bac81cd13e
commit 751147f254
8 changed files with 48 additions and 26 deletions

View File

@ -139,7 +139,7 @@ class Entry(models.Model):
verbose_name = _("entry")
verbose_name_plural = _("entries")
def save(self, *args,**kwargs):
def save(self, *args, **kwargs):
qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest)
if qs.exists():
@ -153,7 +153,7 @@ class Entry(models.Model):
if self.note.balance < 0:
raise ValidationError(_("The balance is negative."))
ret = super().save(*args,**kwargs)
ret = super().save(*args, **kwargs)
if insert and self.guest:
GuestTransaction.objects.create(