Skip to content

round_to_day crashes on graded submissions without timestamps #335

Description

@dbosk

Found by a cache-correctness review sweep.

src/canvaslms/cli/results.py:148 (results.nw) computes round_to_day(submission.submitted_at or submission.graded_at); round_to_day (results.py:210) does timestamp.split("T"). If a submission has a non-None grade but both submitted_at and graded_at are None (which occurs for some manually-entered or excused entries), the summary aborts with AttributeError: 'NoneType' object has no attribute 'split'.

Suggested fix: guard the both-None case in the caller (skip the date or emit an explicit empty date) in src/canvaslms/cli/results.nw, with a test.

Severity: low.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lz1Ft1GN2YqQ6YGLGVYZdT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions