google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Page.get_calculated_status raises exception if page is draft and PAGE_SHOW_START_DATE is used #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create page, publish it
2. Change status back to draft
2. Use get_calculated_status function

Page.save sets publication_date to None if page is draft but 
get_calculated_status uses it to compare against datetime.now():

if settings.PAGE_SHOW_START_DATE:
      if self.publication_date > datetime.now():
         return self.DRAFT

quick fix would be to add check if publication_date is None or not.

Original issue reported on code.google.com by mikko.si...@gmail.com on 7 May 2009 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 10 May 2009 at 2:57