client/securedrop_client/db.py [246:268]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    last_updated = Column(
        DateTime,
        nullable=False,
        default=datetime.datetime.utcnow,
        onupdate=datetime.datetime.utcnow,
    )

    def __init__(self, **kwargs: Any) -> None:
        if "file_counter" in kwargs:
            raise TypeError("Cannot manually set file_counter")
        filename = kwargs["filename"]
        kwargs["file_counter"] = int(filename.split("-")[0])
        super().__init__(**kwargs)

    def __str__(self) -> str:
        """
        Return something that's a useful string representation of the message.
        """
        if self.content is not None:
            return self.content
        else:
            if self.download_error is not None:
                return self.download_error.explain(self.__class__.__name__)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



client/securedrop_client/db.py [461:483]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    last_updated = Column(
        DateTime,
        nullable=False,
        default=datetime.datetime.utcnow,
        onupdate=datetime.datetime.utcnow,
    )

    def __init__(self, **kwargs: Any) -> None:
        if "file_counter" in kwargs:
            raise TypeError("Cannot manually set file_counter")
        filename = kwargs["filename"]
        kwargs["file_counter"] = int(filename.split("-")[0])
        super().__init__(**kwargs)

    def __str__(self) -> str:
        """
        Return something that's a useful string representation of the reply.
        """
        if self.content is not None:
            return self.content
        else:
            if self.download_error is not None:
                return self.download_error.explain(self.__class__.__name__)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



