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

Test activity app

This commit is contained in:
Yohann D'ANELLO
2020-09-04 21:46:40 +02:00
parent 6d1b75b9b6
commit 4ddd763886
3 changed files with 191 additions and 18 deletions

View File

@ -130,7 +130,7 @@ class Activity(models.Model):
raise ValidationError(_("The end date must be after the start date."))
ret = super().save(*args, **kwargs)
if settings.DEBUG and self.pk and "scripts" in settings.INSTALLED_APPS:
if not settings.DEBUG and self.pk and "scripts" in settings.INSTALLED_APPS:
def refresh_activities():
from scripts.management.commands.refresh_activities import Command as RefreshActivitiesCommand
RefreshActivitiesCommand.refresh_human_readable_wiki_page("Modification de l'activité " + self.name)