Skip to content

Commit 8fcdcc2

Browse files
authored
feat: add note when auto-removing a stripcard (#137)
* feat: add note when auto-removing a stripcard * chore: update django
1 parent 93ccb02 commit 8fcdcc2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

LedenAdministratie/management/commands/sync_stripcards.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.core.management.base import BaseCommand
33
from django.utils import timezone
44

5-
from LedenAdministratie.models import Stripcard
5+
from LedenAdministratie.models import Stripcard, Note
66

77

88
class Command(BaseCommand):
@@ -46,4 +46,10 @@ def handle(self, *args, **options):
4646
self.stdout.write(
4747
self.style.SUCCESS(f"Deleting expired stripcard: {stripcard}")
4848
)
49+
Note.objects.create(
50+
text=f"Deleting expired stripcard: {stripcard}",
51+
member=stripcard.member_id,
52+
username="System",
53+
done=True,
54+
)
4955
stripcard.delete()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Django==5.1.9
1+
Django==5.1.10
22
django-cors-headers==4.7.0
33
django-oauth-toolkit==3.0.1
44
django-tinymce==4.1.0

0 commit comments

Comments
 (0)