def METHOD_NAME(self, action: LedgerAction) -> Optional[str]:
    """Edits a ledger action from the DB by identifier
    Does not edit the extra data at the moment
    Returns None for success or an error message for error
    """
    error_msg = None
    query = """
    UPDATE ledger_actions SET timestamp=?, type=?, location=?, amount=?,
    asset=?, rate=?, rate_asset=?, link=?, notes=? WHERE identifier=?"""
    db_action_tuple = action.serialize_for_db()
    with self.db.user_write() as cursor:
        cursor.execute(query, (*db_action_tuple, action.identifier))
        if cursor.rowcount != 1:
            error_msg = (
                f'Tried to edit ledger action with identifier {action.identifier} '
                f'but it was not found in the DB'
            )
    return error_msg