diff --git a/ansible/base.yml b/ansible/base.yml index 330089d5..9ec6724d 100755 --- a/ansible/base.yml +++ b/ansible/base.yml @@ -9,7 +9,7 @@ vars: mirror: deb.debian.org note: - server_name: bde-note.adh.crans.org + server_name: note.crans.org roles: - 1-apt-basic - 2-nk20 diff --git a/apps/activity/tests/test_activities.py b/apps/activity/tests/test_activities.py index db83fb0e..99eb2ffb 100644 --- a/apps/activity/tests/test_activities.py +++ b/apps/activity/tests/test_activities.py @@ -7,7 +7,6 @@ from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse from django.utils import timezone - from activity.models import Activity, ActivityType, Guest, Entry from member.models import Club diff --git a/apps/note/models/notes.py b/apps/note/models/notes.py index e5d9c13c..604e81ae 100644 --- a/apps/note/models/notes.py +++ b/apps/note/models/notes.py @@ -102,7 +102,7 @@ class Note(PolymorphicModel): super().save(*args, **kwargs) - if not Alias.objects.filter(name=str(self)).exists(): + if not Alias.objects.filter(normalized_name=Alias.normalize(str(self))).exists(): a = Alias(name=str(self)) a.clean() diff --git a/apps/note/tables.py b/apps/note/tables.py index 0ca50306..f05edc96 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -46,7 +46,8 @@ class HistoryTable(tables.Table): } ) - created_at = tables.DateTimeColumn(format='Y-m-d H:i:s', + created_at = tables.DateTimeColumn( + format='Y-m-d H:i:s', attrs={ "td": { "class": "text-nowrap", diff --git a/apps/note/templates/note/transaction_form.html b/apps/note/templates/note/transaction_form.html index 15478219..871088d4 100644 --- a/apps/note/templates/note/transaction_form.html +++ b/apps/note/templates/note/transaction_form.html @@ -37,7 +37,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
{# Preview note profile (picture, username and balance) #}
-
+
diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 5f266788..a1fa82e5 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -2631,6 +2631,22 @@ "description": "Modifier la raison d'invalidité d'une transaction si c'est possible" } }, + { + "model": "permission.permission", + "pk": 169, + "fields": { + "model": [ + "note", + "noteclub" + ], + "query": "{\"pk\": [\"club\", \"pk\"]}", + "type": "change", + "mask": 1, + "field": "display_image", + "permanent": false, + "description": "Changer l'image de la note de son club" + } + }, { "model": "permission.role", "pk": 1, @@ -2726,7 +2742,8 @@ 47, 49, 50, - 141 + 141, + 169 ] } }, @@ -3001,7 +3018,11 @@ 162, 163, 164, - 165 + 165, + 166, + 167, + 168, + 169 ] } }, diff --git a/apps/scripts b/apps/scripts index 7479671b..4f5a7947 160000 --- a/apps/scripts +++ b/apps/scripts @@ -1 +1 @@ -Subproject commit 7479671b3f6c499958d3ad991eb54de3010f4da8 +Subproject commit 4f5a794798a48cbbf10b42f0a519743fcbb96c33 diff --git a/apps/treasury/tests/test_treasury.py b/apps/treasury/tests/test_treasury.py index 343b91ec..580cfb2d 100644 --- a/apps/treasury/tests/test_treasury.py +++ b/apps/treasury/tests/test_treasury.py @@ -7,7 +7,6 @@ from django.core.exceptions import ValidationError from django.db.models import Q from django.test import TestCase from django.urls import reverse - from member.models import Membership, Club from note.models import SpecialTransaction, NoteSpecial, Transaction from treasury.models import Invoice, Product, Remittance, RemittanceType, SogeCredit diff --git a/note.cron b/note.cron index f3e18d90..e0d4e754 100644 --- a/note.cron +++ b/note.cron @@ -3,20 +3,20 @@ # m h dom mon dow user command # Envoyer les mails en attente - * * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail >> /var/www/note_kfet/cron_mail.log - * * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred >> /var/www/note_kfet/cron_mail_deferred.log - 00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 >> /var/www/note_kfet/cron_mail_purge.log + * * * * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail + * * * * * root cd /var/www/note_kfet && env/bin/python manage.py retry_deferred + 00 0 * * * root cd /var/www/note_kfet && env/bin/python manage.py purge_mail_log 7 # Faire une sauvegarde de la base de données 00 2 * * * root cd /var/www/note_kfet && apps/scripts/shell/backup_db # Vérifier la cohérence de la base et mailer en cas de problème 00 4 * * * root cd /var/www/note_kfet && env/bin/python manage.py check_consistency --sum-all --check-all --mail # Mettre à jour le wiki (modification sans (dé)validation, activités passées) -#30 5 * * * root cd /var/www/note_kfet && env/bin/python manage.py refresh_activities --raw --comment refresh +#30 5 * * * root cd /var/www/note_kfet && env/bin/python manage.py refresh_activities --raw --comment refresh --wiki # Spammer les gens en négatif 00 5 * * 2 root cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --spam # Envoyer le rapport mensuel aux trésoriers et respos info 00 8 6 * * root cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --report # Envoyer les rapports aux gens 55 6 * * * root cd /var/www/note_kfet && env/bin/python manage.py send_reports -# Envoyer les rapports aux gens +# Mettre à jour les boutons mis en avant 00 9 * * * root cd /var/www/note_kfet && env/bin/python manage.py refresh_highlighted_buttons