def get_caller_log(self):
        """
        If the command was called by another command, return the caller's
        RawDataCommandLog object. Else, return None.
        """
        caller = None

        if not self._called_from_command_line:
            # TODO: see if there's another way to identify caller
            # in (edge) case when update is not called from command line

            # for now, assume the caller is the arg passed to manage.py
            # try getting the most recent log of this command for the version
            try:
                caller = self.command_logs.filter(
                    command=sys.argv[1]
                ).order_by('-start_datetime')[0]
            except __HOLE__:
                pass

        return caller

    #
    # Logging methods
    #
dataset/ETHPy150Open california-civic-data-coalition/django-calaccess-raw-data/calaccess_raw/management/commands/__init__.py/CalAccessCommand.get_caller_log