From 82e88dcab0a85f1887119ab677ffa602f2188363 Mon Sep 17 00:00:00 2001 From: Sli Date: Sat, 28 Dec 2024 17:33:26 +0100 Subject: [PATCH] Fix poster edition and display bug --- com/templates/com/screen_slideshow.jinja | 2 +- com/views.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/com/templates/com/screen_slideshow.jinja b/com/templates/com/screen_slideshow.jinja index 448f8dfc..0374257e 100644 --- a/com/templates/com/screen_slideshow.jinja +++ b/com/templates/com/screen_slideshow.jinja @@ -3,7 +3,7 @@ {% trans %}Slideshow{% endtrans %} - + diff --git a/com/views.py b/com/views.py index 1b7ab8bc..f9993b3c 100644 --- a/com/views.py +++ b/com/views.py @@ -685,8 +685,12 @@ class PosterEditBaseView(UpdateView): def get_initial(self): return { - "date_begin": self.object.date_begin.strftime("%Y-%m-%d %H:%M:%S"), - "date_end": self.object.date_end.strftime("%Y-%m-%d %H:%M:%S"), + "date_begin": self.object.date_begin.strftime("%Y-%m-%d %H:%M:%S") + if self.object.date_begin + else None, + "date_end": self.object.date_end.strftime("%Y-%m-%d %H:%M:%S") + if self.object.date_end + else None, } def dispatch(self, request, *args, **kwargs):