File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1060,8 +1060,7 @@ def sessions_post_save(request, forms):
10601060 by = request .user .person ,
10611061 )
10621062
1063- if ('date' in form .changed_data ) or ('time' in form .changed_data ):
1064- update_interim_session_assignment (form )
1063+ update_interim_session_assignment (form )
10651064 if 'agenda' in form .changed_data :
10661065 form .save_agenda ()
10671066
@@ -1140,6 +1139,8 @@ def update_interim_session_assignment(form):
11401139 """Helper function to create / update timeslot assigned to interim session
11411140
11421141 form is an InterimSessionModelForm
1142+
1143+ Only updates timeslot time (a datetime) and duration
11431144 """
11441145 session = form .instance
11451146 meeting = session .meeting
@@ -1148,9 +1149,10 @@ def update_interim_session_assignment(form):
11481149 )
11491150 if session .official_timeslotassignment ():
11501151 slot = session .official_timeslotassignment ().timeslot
1151- slot .time = time
1152- slot .duration = session .requested_duration
1153- slot .save ()
1152+ if slot .time != time or slot .duration != session .requested_duration :
1153+ slot .time = time
1154+ slot .duration = session .requested_duration
1155+ slot .save ()
11541156 else :
11551157 slot = TimeSlot .objects .create (
11561158 meeting = meeting ,
You can’t perform that action at this time.
0 commit comments