1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Create WEI

This commit is contained in:
Yohann D'ANELLO
2020-04-12 02:43:22 +02:00
parent 69b7f31eed
commit ea8e25a7b3
4 changed files with 29 additions and 9 deletions

View File

@ -17,7 +17,7 @@ def save_user_note(instance, raw, **_kwargs):
instance.note.save()
def save_club_note(instance, created, raw, **_kwargs):
def save_club_note(instance, raw, **_kwargs):
"""
Hook to create and save a note when a club is updated
"""
@ -25,7 +25,6 @@ def save_club_note(instance, created, raw, **_kwargs):
# When provisionning data, do not try to autocreate
return
if created:
from .models import NoteClub
NoteClub.objects.create(club=instance)
from .models import NoteClub
NoteClub.objects.get_or_create(club=instance)
instance.note.save()