Changeset 195085 in indico for indico/MaKaC/conference.py


Ignore:
Timestamp:
11/22/11 16:36:01 (18 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
75eb7c5, cf0996
Parents:
dcdf89
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (11/02/11 16:35:56)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (11/22/11 16:36:01)
Message:

[IMP] Event rescheduling: more intelligent check

  • when verifying if the event can be changed with rescheduling entries, do not simply check if the interval became shorter but actually check if the entries are going to fit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    rb3cf3f r195085  
    27612761            newInterval = eDate - sDate 
    27622762 
    2763             if oldInterval > newInterval: 
    2764                 raise TimingError( 
    2765                     _("The start/end dates were not changed since the selected " 
    2766                       "timespan is not large enough to accomodate the contained " 
    2767                       "timetable entries and spacings."), 
    2768                     explanation = 
    2769                     _("You should try using a larger timespan.")) 
     2763            entries = self.getSchedule().getEntries() 
     2764            if oldInterval > newInterval and entries: 
     2765                eventInterval = entries[-1].getEndDate() - entries[0].getStartDate() 
     2766                diff = entries[0].getStartDate() - oldStartDate 
     2767                if sDate + diff + eventInterval > eDate: 
     2768                    raise TimingError( 
     2769                        _("The start/end dates were not changed since the selected " 
     2770                          "timespan is not large enough to accomodate the contained " 
     2771                          "timetable entries and spacings."), 
     2772                        explanation=_("You should try using a larger timespan.")) 
    27702773 
    27712774        # so, we really need to try changing something 
Note: See TracChangeset for help on using the changeset viewer.