Skip to content

Commit

Permalink
Fix for last_modified being None (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou authored Dec 19, 2023
1 parent 6b9986b commit c1f94fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jupyter_collaboration/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ async def _on_content_change(self, event: str, args: dict[str, Any]) -> None:
event (str): Type of change.
args (dict): A dictionary with format, type, last_modified.
"""
if event == "metadata" and self._last_modified < args["last_modified"]:
if event == "metadata" and (
self._last_modified is None or self._last_modified < args["last_modified"]
):
self.log.info("Out-of-band changes. Overwriting the content in room %s", self._room_id)
self._emit(LogLevel.INFO, "overwrite", "Out-of-band changes. Overwriting the room.")

Expand Down

0 comments on commit c1f94fd

Please sign in to comment.