Skip to content

Article 3917569 has Source with missing source_text #443

@mircealungu

Description

@mircealungu

Bug

Article ID 3917569 causes a crash when trying to open it:

File "/Users/gh/zeeguu/api/zeeguu/core/model/source.py", line 46, in get_content
    return self.source_text.content
AttributeError: 'NoneType' object has no attribute 'content'

Cause

The article has a source_id pointing to a Source record, but that Source's source_text_id is NULL or points to a non-existent SourceText.

Investigation needed

  1. Check the Source record linked to this article
  2. Determine how this data inconsistency occurred
  3. Either fix the data or mark the article as broken

Temporary workaround

A defensive null check was added in PR #441, but this masks the real issue rather than fixing it.

Reproduce

Visit: /read/article?id=3917569

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions