Skip to content

宿題記法のリンク先のタスクを削除してリンクを踏むとエラーが発生する #45

@miyake13000

Description

@miyake13000

概要

PR #36 によるバグ報告

再現手順

  1. 新規に作成した宿題記法を踏み,タスクを作成する
  2. 1 により作成したタスクを削除する
  3. 1 で作成した宿題記法を踏む
  4. エラーが発生する

原因

以下のコードが直接的な要因である

<% task_url = ActionItem.find_by(uid:matched[1].to_i).task_url %>

  • タスクを削除すると ActionItem.find_by で nil が返るため,その後の task_url で NoMethodError が発生する

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions