@@ -235,17 +235,7 @@ def update_or_create(
235235 new_values ['upstream_block' ] = upstream_block
236236 try :
237237 link = cls .objects .get (downstream_usage_key = downstream_usage_key )
238- # TODO: until we save modified datetime for course xblocks in index, the modified time for links are updated
239- # everytime a downstream/course block is updated.
240- # Hardcoding has_changes = True makes sure that the link modified time is updated whenever downstream block
241- # is updated and this allows us to sort upstream links in course libraries page by recently modified
242- # downstream blocks: [1].
243- # pylint: disable=line-too-long
244- # 1. https://github.com/open-craft/frontend-app-course-authoring/blob/0443d88824095f6f65a3a64b77244af590d4edff/src/course-libraries/ReviewTabContent.tsx#L222-L233
245- # Ideally, in the future, whenever you modify a downstream XBlock, the code will change the ComponentLink
246- # "last modified at" time only if something relevant to the upstream sync was modified, like the upstream
247- # source was changed, or the sync was dismissed (skip the update for this particular version) or accepted.
248- has_changes = True # change to false once we save modified time in course xblocks
238+ has_changes = False
249239 for key , new_value in new_values .items ():
250240 prev_value = getattr (link , key )
251241 if prev_value != new_value :
@@ -320,17 +310,7 @@ def update_or_create(
320310 new_values ['upstream_container' ] = upstream_container
321311 try :
322312 link = cls .objects .get (downstream_usage_key = downstream_usage_key )
323- # TODO: until we save modified datetime for course xblocks in index, the modified time for links are updated
324- # everytime a downstream/course block is updated.
325- # Hardcoding has_changes = True makes sure that the link modified time is updated whenever downstream block
326- # is updated and this allows us to sort upstream links in course libraries page by recently modified
327- # downstream blocks: [1].
328- # pylint: disable=line-too-long
329- # 1. https://github.com/open-craft/frontend-app-course-authoring/blob/0443d88824095f6f65a3a64b77244af590d4edff/src/course-libraries/ReviewTabContent.tsx#L222-L233
330- # Ideally, in the future, whenever you modify a downstream XBlock, the code will change the ComponentLink
331- # "last modified at" time only if something relevant to the upstream sync was modified, like the upstream
332- # source was changed, or the sync was dismissed (skip the update for this particular version) or accepted.
333- has_changes = True # change to false once we save modified time in course xblocks
313+ has_changes = False
334314 for key , new_value in new_values .items ():
335315 prev_value = getattr (link , key )
336316 if prev_value != new_value :
0 commit comments