def get_delay(self, update):
        """Return the minutes to delay the viewing of submission results.

        Only store information into the datebase when `update` is set.

        """
        if hasattr(self, '_delay'):
            return self._delay

        now = datetime.now(UTC())
        zero = timedelta(0)
        delay = self.project.delay - (now - self.created_at)
        if delay <= zero:  # Never delay longer than the project's delay time
            self._delay = None
        elif self.group.viewed_at is None:  # Don't delay
            if update:
                self.group.viewed_at = func.now()
            self._delay = None
        elif self.created_at <= self.group.viewed_at:  # Show older results
            self._delay = None
        else:
            pv_delay = self.project.delay - (now - self.group.viewed_at)
            if pv_delay <= zero:
                if update:  # Update the counter
                    self.group.viewed_at = func.now()
                self._delay = None
            else:
                self._delay = min(delay, pv_delay).total_seconds() / 60
        return self._delay
Return the minutes to delay the viewing of submission results.

        Only store information into the datebase when `update` is set.