mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	edit_history: Support prev_subject not being present in database.
This commit serves as a checkpoint that can be deployed to production before running the big Message format migration in the next commit.
This commit is contained in:
		@@ -51,8 +51,11 @@ def fill_edit_history_entries(
 | 
			
		||||
            "user_id": edit_history_event["user_id"],
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        # Add current topic, map LEGACY_PREV_TOPIC => "prev_topic".
 | 
			
		||||
        if LEGACY_PREV_TOPIC in edit_history_event:
 | 
			
		||||
        if "prev_topic" in edit_history_event:
 | 
			
		||||
            prev_topic = edit_history_event["prev_topic"]
 | 
			
		||||
            formatted_entry["prev_topic"] = prev_topic
 | 
			
		||||
        elif LEGACY_PREV_TOPIC in edit_history_event:
 | 
			
		||||
            # TODO: Delete this once we've finished migrating legacy message objects.
 | 
			
		||||
            prev_topic = edit_history_event["prev_subject"]
 | 
			
		||||
            formatted_entry["prev_topic"] = prev_topic
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user